1/*
2 * IDENTIFICATION:
3 * stub generated by bootstrap_cmds-133
4 * OPTIONS:
5 * KernelServer
6 */
7
8/* Module iokit */
9
10#define __MIG_check__Request__iokit_subsystem__ 1
11
12#include "device_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 _Xio_object_get_class
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 _Xio_object_conforms_to
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 _Xio_iterator_next
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 _Xio_iterator_reset
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 _Xio_service_get_matching_services
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 _Xio_registry_entry_get_property
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 _Xio_registry_create_iterator
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 _Xio_registry_iterator_enter_entry
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 _Xio_registry_iterator_exit_entry
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 _Xio_registry_entry_from_path
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 _Xio_registry_entry_get_name
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 _Xio_registry_entry_get_properties
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 _Xio_registry_entry_get_property_bytes
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 _Xio_registry_entry_get_child_iterator
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 _Xio_registry_entry_get_parent_iterator
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 _Xio_service_close
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 _Xio_connect_get_service
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 _Xio_connect_set_notification_port
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 _Xio_connect_map_memory
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 _Xio_connect_add_client
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 _Xio_connect_set_properties
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 _Xio_connect_method_scalarI_scalarO
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 _Xio_connect_method_scalarI_structureO
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 _Xio_connect_method_scalarI_structureI
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 _Xio_connect_method_structureI_structureO
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 _Xio_registry_entry_get_path
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 _Xio_registry_get_root_entry
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 _Xio_registry_entry_set_properties
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 _Xio_registry_entry_in_plane
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 _Xio_object_get_retain_count
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 _Xio_service_get_busy_state
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 _Xio_service_wait_quiet
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 _Xio_registry_entry_create_iterator
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 _Xio_iterator_is_valid
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 _Xio_catalog_send_data
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 _Xio_catalog_terminate
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 _Xio_catalog_get_data
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 _Xio_catalog_get_gen_count
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 _Xio_catalog_module_loaded
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 _Xio_catalog_reset
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 _Xio_service_request_probe
222 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
223
224mig_internal novalue _Xio_registry_entry_get_name_in_plane
225 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
226
227mig_internal novalue _Xio_service_match_property_table
228 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
229
230mig_internal novalue _Xio_async_method_scalarI_scalarO
231 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
232
233mig_internal novalue _Xio_async_method_scalarI_structureO
234 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
235
236mig_internal novalue _Xio_async_method_scalarI_structureI
237 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
238
239mig_internal novalue _Xio_async_method_structureI_structureO
240 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
241
242mig_internal novalue _Xio_service_add_notification
243 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
244
245mig_internal novalue _Xio_service_add_interest_notification
246 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
247
248mig_internal novalue _Xio_service_acknowledge_notification
249 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
250
251mig_internal novalue _Xio_connect_get_notification_semaphore
252 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
253
254mig_internal novalue _Xio_connect_unmap_memory
255 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
256
257mig_internal novalue _Xio_registry_entry_get_location_in_plane
258 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
259
260mig_internal novalue _Xio_registry_entry_get_property_recursively
261 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
262
263mig_internal novalue _Xio_service_get_state
264 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
265
266mig_internal novalue _Xio_service_get_matching_services_ool
267 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
268
269mig_internal novalue _Xio_service_match_property_table_ool
270 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
271
272mig_internal novalue _Xio_service_add_notification_ool
273 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
274
275mig_internal novalue _Xio_object_get_superclass
276 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
277
278mig_internal novalue _Xio_object_get_bundle_identifier
279 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
280
281mig_internal novalue _Xio_service_open_extended
282 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
283
284mig_internal novalue _Xio_connect_map_memory_into_task
285 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
286
287mig_internal novalue _Xio_connect_unmap_memory_from_task
288 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
289
290mig_internal novalue _Xio_connect_method
291 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
292
293mig_internal novalue _Xio_connect_async_method
294 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
295
296mig_internal novalue _Xio_connect_set_notification_port_64
297 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
298
299mig_internal novalue _Xio_service_add_notification_64
300 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
301
302mig_internal novalue _Xio_service_add_interest_notification_64
303 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
304
305mig_internal novalue _Xio_service_add_notification_ool_64
306 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
307
308mig_internal novalue _Xio_registry_entry_get_registry_entry_id
309 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
310
311mig_internal novalue _Xio_connect_method_var_output
312 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
313
314mig_internal novalue _Xio_service_get_matching_service
315 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
316
317mig_internal novalue _Xio_service_get_matching_service_ool
318 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
319
320mig_internal novalue _Xio_service_get_authorization_id
321 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
322
323mig_internal novalue _Xio_service_set_authorization_id
324 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
325
326mig_internal novalue _Xio_server_version
327 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
328
329mig_internal novalue _Xio_registry_entry_get_properties_bin
330 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
331
332mig_internal novalue _Xio_registry_entry_get_property_bin
333 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
334
335mig_internal novalue _Xio_service_get_matching_service_bin
336 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
337
338mig_internal novalue _Xio_service_get_matching_services_bin
339 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
340
341mig_internal novalue _Xio_service_match_property_table_bin
342 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
343
344mig_internal novalue _Xio_service_add_notification_bin
345 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
346
347mig_internal novalue _Xio_service_add_notification_bin_64
348 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
349
350mig_internal novalue _Xio_registry_entry_get_path_ool
351 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
352
353mig_internal novalue _Xio_registry_entry_from_path_ool
354 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
355
356mig_internal novalue _Xio_device_tree_entry_exists_with_name
357 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
358
359mig_internal novalue _Xio_registry_entry_get_properties_bin_buf
360 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
361
362mig_internal novalue _Xio_registry_entry_get_property_bin_buf
363 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
364
365mig_internal novalue _Xio_service_wait_quiet_with_options
366 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
367
368
369#if ( __MigTypeCheck )
370#if __MIG_check__Request__iokit_subsystem__
371#if !defined(__MIG_check__Request__io_object_get_class_t__defined)
372#define __MIG_check__Request__io_object_get_class_t__defined
373
374mig_internal kern_return_t __MIG_check__Request__io_object_get_class_t(
375 __attribute__((__unused__)) __RequestKData__io_object_get_class_t *InKP,
376 __attribute__((__unused__)) __RequestUData__io_object_get_class_t *In0UP,
377 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
378{
379
380 typedef __Request__io_object_get_class_t __Request;
381 typedef __RequestUData__io_object_get_class_t __RequestU __attribute__((unused));
382#if __MigTypeCheck
383 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
384 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
385 return MIG_BAD_ARGUMENTS;
386#endif /* __MigTypeCheck */
387
388 return MACH_MSG_SUCCESS;
389}
390#endif /* !defined(__MIG_check__Request__io_object_get_class_t__defined) */
391#endif /* __MIG_check__Request__iokit_subsystem__ */
392#endif /* ( __MigTypeCheck ) */
393
394
395/* Routine io_object_get_class */
396mig_internal novalue _Xio_object_get_class
397 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
398 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
399 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
400{
401
402#ifdef __MigPackStructs
403#pragma pack(push, 4)
404#endif
405 typedef struct {
406 mach_msg_trailer_t trailer;
407 char padding[0]; /* Avoid generating empty UData structs */
408 } RequestU __attribute__((unused));
409#ifdef __MigPackStructs
410#pragma pack(pop)
411#endif
412 typedef __RequestKData__io_object_get_class_t RequestK;
413 typedef __RequestUData__io_object_get_class_t __RequestU;
414 typedef __ReplyKData__io_object_get_class_t ReplyK __attribute__((unused));
415 typedef __ReplyUData__io_object_get_class_t ReplyU __attribute__((unused));
416 typedef __Reply__io_object_get_class_t Reply __attribute__((unused));
417 typedef __Request__io_object_get_class_t __Request __attribute__((unused));
418
419 /*
420 * typedef struct {
421 * mach_msg_header_t Head;
422 * NDR_record_t NDR;
423 * kern_return_t RetCode;
424 * } mig_reply_error_t;
425 */
426
427 RequestK *InKP = (RequestK *) InHeadP;
428 RequestU *In0UP = (RequestU *) InDataP;
429 ReplyK *OutKP = (ReplyK *) OutHeadP;
430 ReplyU *OutUP = (ReplyU *) OutDataP;
431 (void)OutUP;
432#ifdef __MIG_check__Request__io_object_get_class_t__defined
433 kern_return_t check_result;
434#endif /* __MIG_check__Request__io_object_get_class_t__defined */
435
436#if __MigKernelSpecificCode
437#else
438#endif /* __MigKernelSpecificCode */
439 io_object_t object;
440
441 __DeclareRcvRpc(2800, "io_object_get_class")
442 __BeforeRcvRpc(2800, "io_object_get_class")
443
444#if defined(__MIG_check__Request__io_object_get_class_t__defined)
445 check_result = __MIG_check__Request__io_object_get_class_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
446 if (check_result != MACH_MSG_SUCCESS)
447 { MIG_RETURN_ERROR(OutKP, check_result); }
448#endif /* defined(__MIG_check__Request__io_object_get_class_t__defined) */
449
450 object = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
451
452 OutUP->RetCode = is_io_object_get_class(object, className: OutUP->className);
453 iokit_remove_reference(obj: object);
454 if (OutUP->RetCode != KERN_SUCCESS) {
455 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
456 }
457#if __MigKernelSpecificCode
458#endif /* __MigKernelSpecificCode */
459
460 OutUP->NDR = NDR_record;
461
462#ifdef __LP64__
463 {
464 size_t strLength = strlen(s: OutUP->className) + 1;
465 if (strLength > 0xffffffff)
466 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
467 OutUP->classNameCnt = (mach_msg_type_number_t) strLength;
468 }
469#else
470 OutUP->classNameCnt = (mach_msg_type_number_t) strlen(OutUP->className) + 1;
471#endif /* __LP64__ */
472 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutUP->classNameCnt + 3) & ~3));
473
474 __AfterRcvRpc(2800, "io_object_get_class")
475}
476
477#if ( __MigTypeCheck )
478#if __MIG_check__Request__iokit_subsystem__
479#if !defined(__MIG_check__Request__io_object_conforms_to_t__defined)
480#define __MIG_check__Request__io_object_conforms_to_t__defined
481
482mig_internal kern_return_t __MIG_check__Request__io_object_conforms_to_t(
483 __attribute__((__unused__)) __RequestKData__io_object_conforms_to_t *InKP,
484 __attribute__((__unused__)) __RequestUData__io_object_conforms_to_t *In0UP,
485 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
486{
487
488 typedef __Request__io_object_conforms_to_t __Request;
489 typedef __RequestUData__io_object_conforms_to_t __RequestU __attribute__((unused));
490#if __MigTypeCheck
491 unsigned int msgh_size;
492#endif /* __MigTypeCheck */
493
494#if __MigTypeCheck
495 msgh_size = InKP->Head.msgh_size;
496 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
497 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
498 return MIG_BAD_ARGUMENTS;
499#endif /* __MigTypeCheck */
500
501#if defined(__NDR_convert__int_rep__Request__io_object_conforms_to_t__classNameCnt__defined)
502 if (In0UP->NDR.int_rep != NDR_record.int_rep)
503 __NDR_convert__int_rep__Request__io_object_conforms_to_t__classNameCnt(&In0UP->classNameCnt, In0UP->NDR.int_rep);
504#endif /* __NDR_convert__int_rep__Request__io_object_conforms_to_t__classNameCnt__defined */
505#if __MigTypeCheck
506 if (In0UP->classNameCnt > 128)
507 return MIG_BAD_ARGUMENTS;
508 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->classNameCnt) ||
509 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->classNameCnt)))
510 return MIG_BAD_ARGUMENTS;
511#endif /* __MigTypeCheck */
512
513#if __MigTypeCheck
514 {
515 char * msg_limit = (char *) InTrailerP;
516#if __MigKernelSpecificCode
517 size_t strnlen_limit;
518#else
519 size_t memchr_limit;
520#endif /* __MigKernelSpecificCode */
521
522#if __MigKernelSpecificCode
523 strnlen_limit = min((msg_limit - In0UP->className), 128);
524 if (( strnlen(s: In0UP->className, n: strnlen_limit) >= 128 + 1 ))
525 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
526#else
527 memchr_limit = min((msg_limit - In0UP->className), 128);
528 if (( memchr(In0UP->className, '\0', memchr_limit) == NULL ))
529 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
530#endif /* __MigKernelSpecificCode */
531 }
532#endif /* __MigTypeCheck */
533
534 return MACH_MSG_SUCCESS;
535}
536#endif /* !defined(__MIG_check__Request__io_object_conforms_to_t__defined) */
537#endif /* __MIG_check__Request__iokit_subsystem__ */
538#endif /* ( __MigTypeCheck ) */
539
540
541/* Routine io_object_conforms_to */
542mig_internal novalue _Xio_object_conforms_to
543 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
544 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
545 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
546{
547
548#ifdef __MigPackStructs
549#pragma pack(push, 4)
550#endif
551 typedef struct {
552 NDR_record_t NDR;
553 mach_msg_type_number_t classNameOffset; /* MiG doesn't use it */
554 mach_msg_type_number_t classNameCnt;
555 char className[128];
556 mach_msg_trailer_t trailer;
557 char padding[0]; /* Avoid generating empty UData structs */
558 } RequestU __attribute__((unused));
559#ifdef __MigPackStructs
560#pragma pack(pop)
561#endif
562 typedef __RequestKData__io_object_conforms_to_t RequestK;
563 typedef __RequestUData__io_object_conforms_to_t __RequestU;
564 typedef __ReplyKData__io_object_conforms_to_t ReplyK __attribute__((unused));
565 typedef __ReplyUData__io_object_conforms_to_t ReplyU __attribute__((unused));
566 typedef __Reply__io_object_conforms_to_t Reply __attribute__((unused));
567 typedef __Request__io_object_conforms_to_t __Request __attribute__((unused));
568
569 /*
570 * typedef struct {
571 * mach_msg_header_t Head;
572 * NDR_record_t NDR;
573 * kern_return_t RetCode;
574 * } mig_reply_error_t;
575 */
576
577 RequestK *InKP = (RequestK *) InHeadP;
578 RequestU *In0UP = (RequestU *) InDataP;
579 ReplyK *OutKP = (ReplyK *) OutHeadP;
580 ReplyU *OutUP = (ReplyU *) OutDataP;
581 (void)OutUP;
582#ifdef __MIG_check__Request__io_object_conforms_to_t__defined
583 kern_return_t check_result;
584#endif /* __MIG_check__Request__io_object_conforms_to_t__defined */
585
586#if __MigKernelSpecificCode
587#else
588#endif /* __MigKernelSpecificCode */
589 io_object_t object;
590
591 __DeclareRcvRpc(2801, "io_object_conforms_to")
592 __BeforeRcvRpc(2801, "io_object_conforms_to")
593
594#if defined(__MIG_check__Request__io_object_conforms_to_t__defined)
595 check_result = __MIG_check__Request__io_object_conforms_to_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
596 if (check_result != MACH_MSG_SUCCESS)
597 { MIG_RETURN_ERROR(OutKP, check_result); }
598#endif /* defined(__MIG_check__Request__io_object_conforms_to_t__defined) */
599
600 object = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
601
602 OutUP->RetCode = is_io_object_conforms_to(object, className: In0UP->className, conforms: &OutUP->conforms);
603 iokit_remove_reference(obj: object);
604 if (OutUP->RetCode != KERN_SUCCESS) {
605 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
606 }
607#if __MigKernelSpecificCode
608#endif /* __MigKernelSpecificCode */
609
610 OutUP->NDR = NDR_record;
611
612
613 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
614 __AfterRcvRpc(2801, "io_object_conforms_to")
615}
616
617#if ( __MigTypeCheck )
618#if __MIG_check__Request__iokit_subsystem__
619#if !defined(__MIG_check__Request__io_iterator_next_t__defined)
620#define __MIG_check__Request__io_iterator_next_t__defined
621
622mig_internal kern_return_t __MIG_check__Request__io_iterator_next_t(
623 __attribute__((__unused__)) __RequestKData__io_iterator_next_t *InKP,
624 __attribute__((__unused__)) __RequestUData__io_iterator_next_t *In0UP,
625 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
626{
627
628 typedef __Request__io_iterator_next_t __Request;
629 typedef __RequestUData__io_iterator_next_t __RequestU __attribute__((unused));
630#if __MigTypeCheck
631 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
632 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
633 return MIG_BAD_ARGUMENTS;
634#endif /* __MigTypeCheck */
635
636 return MACH_MSG_SUCCESS;
637}
638#endif /* !defined(__MIG_check__Request__io_iterator_next_t__defined) */
639#endif /* __MIG_check__Request__iokit_subsystem__ */
640#endif /* ( __MigTypeCheck ) */
641
642
643/* Routine io_iterator_next */
644mig_internal novalue _Xio_iterator_next
645 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
646 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
647 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
648{
649
650#ifdef __MigPackStructs
651#pragma pack(push, 4)
652#endif
653 typedef struct {
654 mach_msg_trailer_t trailer;
655 char padding[0]; /* Avoid generating empty UData structs */
656 } RequestU __attribute__((unused));
657#ifdef __MigPackStructs
658#pragma pack(pop)
659#endif
660 typedef __RequestKData__io_iterator_next_t RequestK;
661 typedef __RequestUData__io_iterator_next_t __RequestU;
662 typedef __ReplyKData__io_iterator_next_t ReplyK __attribute__((unused));
663 typedef __ReplyUData__io_iterator_next_t ReplyU __attribute__((unused));
664 typedef __Reply__io_iterator_next_t Reply __attribute__((unused));
665 typedef __Request__io_iterator_next_t __Request __attribute__((unused));
666
667 /*
668 * typedef struct {
669 * mach_msg_header_t Head;
670 * NDR_record_t NDR;
671 * kern_return_t RetCode;
672 * } mig_reply_error_t;
673 */
674
675 RequestK *InKP = (RequestK *) InHeadP;
676 RequestU *In0UP = (RequestU *) InDataP;
677 ReplyK *OutKP = (ReplyK *) OutHeadP;
678 ReplyU *OutUP = (ReplyU *) OutDataP;
679 (void)OutUP;
680#ifdef __MIG_check__Request__io_iterator_next_t__defined
681 kern_return_t check_result;
682#endif /* __MIG_check__Request__io_iterator_next_t__defined */
683
684#if __MigKernelSpecificCode
685#if UseStaticTemplates
686 const static mach_msg_port_descriptor_t objectTemplate = {
687 /* name = */ MACH_PORT_NULL,
688 /* pad1 = */ 0,
689 /* pad2 = */ 0,
690 /* disp = */ 17,
691 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
692 };
693#endif /* UseStaticTemplates */
694
695#else
696#if UseStaticTemplates
697 const static mach_msg_port_descriptor_t objectTemplate = {
698 /* name = */ MACH_PORT_NULL,
699 /* pad1 = */ 0,
700 /* pad2 = */ 0,
701 /* disp = */ 19,
702 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
703 };
704#endif /* UseStaticTemplates */
705
706#endif /* __MigKernelSpecificCode */
707 kern_return_t RetCode;
708 io_object_t iterator;
709 io_object_t object;
710
711 __DeclareRcvRpc(2802, "io_iterator_next")
712 __BeforeRcvRpc(2802, "io_iterator_next")
713
714#if defined(__MIG_check__Request__io_iterator_next_t__defined)
715 check_result = __MIG_check__Request__io_iterator_next_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
716 if (check_result != MACH_MSG_SUCCESS)
717 { MIG_RETURN_ERROR(OutKP, check_result); }
718#endif /* defined(__MIG_check__Request__io_iterator_next_t__defined) */
719
720#if UseStaticTemplates
721 OutKP->object = objectTemplate;
722#else /* UseStaticTemplates */
723#if __MigKernelSpecificCode
724 OutKP->object.disposition = 17;
725#else
726 OutKP->object.disposition = 19;
727#endif /* __MigKernelSpecificCode */
728#if !(defined(KERNEL) && defined(__LP64__))
729 OutKP->object.pad1 = 0;
730#endif
731 OutKP->object.pad2 = 0;
732 OutKP->object.type = MACH_MSG_PORT_DESCRIPTOR;
733#if defined(KERNEL)
734 OutKP->object.pad_end = 0;
735#endif
736#endif /* UseStaticTemplates */
737
738
739 iterator = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
740
741 RetCode = is_io_iterator_next(iterator, object: &object);
742 iokit_remove_reference(obj: iterator);
743 if (RetCode != KERN_SUCCESS) {
744 MIG_RETURN_ERROR(OutKP, RetCode);
745 }
746#if __MigKernelSpecificCode
747#endif /* __MigKernelSpecificCode */
748 OutKP->object.name = (mach_port_t)iokit_make_object_port(obj: object);
749
750
751 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
752 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
753 OutKP->msgh_body.msgh_descriptor_count = 1;
754 __AfterRcvRpc(2802, "io_iterator_next")
755}
756
757#if ( __MigTypeCheck )
758#if __MIG_check__Request__iokit_subsystem__
759#if !defined(__MIG_check__Request__io_iterator_reset_t__defined)
760#define __MIG_check__Request__io_iterator_reset_t__defined
761
762mig_internal kern_return_t __MIG_check__Request__io_iterator_reset_t(
763 __attribute__((__unused__)) __RequestKData__io_iterator_reset_t *InKP,
764 __attribute__((__unused__)) __RequestUData__io_iterator_reset_t *In0UP,
765 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
766{
767
768 typedef __Request__io_iterator_reset_t __Request;
769 typedef __RequestUData__io_iterator_reset_t __RequestU __attribute__((unused));
770#if __MigTypeCheck
771 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
772 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
773 return MIG_BAD_ARGUMENTS;
774#endif /* __MigTypeCheck */
775
776 return MACH_MSG_SUCCESS;
777}
778#endif /* !defined(__MIG_check__Request__io_iterator_reset_t__defined) */
779#endif /* __MIG_check__Request__iokit_subsystem__ */
780#endif /* ( __MigTypeCheck ) */
781
782
783/* Routine io_iterator_reset */
784mig_internal novalue _Xio_iterator_reset
785 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
786 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
787 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
788{
789
790#ifdef __MigPackStructs
791#pragma pack(push, 4)
792#endif
793 typedef struct {
794 mach_msg_trailer_t trailer;
795 char padding[0]; /* Avoid generating empty UData structs */
796 } RequestU __attribute__((unused));
797#ifdef __MigPackStructs
798#pragma pack(pop)
799#endif
800 typedef __RequestKData__io_iterator_reset_t RequestK;
801 typedef __RequestUData__io_iterator_reset_t __RequestU;
802 typedef __ReplyKData__io_iterator_reset_t ReplyK __attribute__((unused));
803 typedef __ReplyUData__io_iterator_reset_t ReplyU __attribute__((unused));
804 typedef __Reply__io_iterator_reset_t Reply __attribute__((unused));
805 typedef __Request__io_iterator_reset_t __Request __attribute__((unused));
806
807 /*
808 * typedef struct {
809 * mach_msg_header_t Head;
810 * NDR_record_t NDR;
811 * kern_return_t RetCode;
812 * } mig_reply_error_t;
813 */
814
815 RequestK *InKP = (RequestK *) InHeadP;
816 RequestU *In0UP = (RequestU *) InDataP;
817 ReplyK *OutKP = (ReplyK *) OutHeadP;
818 ReplyU *OutUP = (ReplyU *) OutDataP;
819 (void)OutUP;
820#ifdef __MIG_check__Request__io_iterator_reset_t__defined
821 kern_return_t check_result;
822#endif /* __MIG_check__Request__io_iterator_reset_t__defined */
823
824#if __MigKernelSpecificCode
825#else
826#endif /* __MigKernelSpecificCode */
827 io_object_t iterator;
828
829 __DeclareRcvRpc(2803, "io_iterator_reset")
830 __BeforeRcvRpc(2803, "io_iterator_reset")
831
832#if defined(__MIG_check__Request__io_iterator_reset_t__defined)
833 check_result = __MIG_check__Request__io_iterator_reset_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
834 if (check_result != MACH_MSG_SUCCESS)
835 { MIG_RETURN_ERROR(OutKP, check_result); }
836#endif /* defined(__MIG_check__Request__io_iterator_reset_t__defined) */
837
838 iterator = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
839
840 OutUP->RetCode = is_io_iterator_reset(iterator);
841 iokit_remove_reference(obj: iterator);
842#if __MigKernelSpecificCode
843#endif /* __MigKernelSpecificCode */
844
845 OutUP->NDR = NDR_record;
846
847
848 __AfterRcvRpc(2803, "io_iterator_reset")
849}
850
851#if ( __MigTypeCheck )
852#if __MIG_check__Request__iokit_subsystem__
853#if !defined(__MIG_check__Request__io_service_get_matching_services_t__defined)
854#define __MIG_check__Request__io_service_get_matching_services_t__defined
855
856mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_services_t(
857 __attribute__((__unused__)) __RequestKData__io_service_get_matching_services_t *InKP,
858 __attribute__((__unused__)) __RequestUData__io_service_get_matching_services_t *In0UP,
859 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
860{
861
862 typedef __Request__io_service_get_matching_services_t __Request;
863 typedef __RequestUData__io_service_get_matching_services_t __RequestU __attribute__((unused));
864#if __MigTypeCheck
865 unsigned int msgh_size;
866#endif /* __MigTypeCheck */
867
868#if __MigTypeCheck
869 msgh_size = InKP->Head.msgh_size;
870 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
871 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
872 return MIG_BAD_ARGUMENTS;
873#endif /* __MigTypeCheck */
874
875#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_services_t__matchingCnt__defined)
876 if (In0UP->NDR.int_rep != NDR_record.int_rep)
877 __NDR_convert__int_rep__Request__io_service_get_matching_services_t__matchingCnt(&In0UP->matchingCnt, In0UP->NDR.int_rep);
878#endif /* __NDR_convert__int_rep__Request__io_service_get_matching_services_t__matchingCnt__defined */
879#if __MigTypeCheck
880 if (In0UP->matchingCnt > 512)
881 return MIG_BAD_ARGUMENTS;
882 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0UP->matchingCnt) ||
883 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0UP->matchingCnt)))
884 return MIG_BAD_ARGUMENTS;
885#endif /* __MigTypeCheck */
886
887#if __MigTypeCheck
888 {
889 char * msg_limit = (char *) InTrailerP;
890#if __MigKernelSpecificCode
891 size_t strnlen_limit;
892#else
893 size_t memchr_limit;
894#endif /* __MigKernelSpecificCode */
895
896#if __MigKernelSpecificCode
897 strnlen_limit = min((msg_limit - In0UP->matching), 512);
898 if (( strnlen(s: In0UP->matching, n: strnlen_limit) >= 512 + 1 ))
899 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
900#else
901 memchr_limit = min((msg_limit - In0UP->matching), 512);
902 if (( memchr(In0UP->matching, '\0', memchr_limit) == NULL ))
903 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
904#endif /* __MigKernelSpecificCode */
905 }
906#endif /* __MigTypeCheck */
907
908 return MACH_MSG_SUCCESS;
909}
910#endif /* !defined(__MIG_check__Request__io_service_get_matching_services_t__defined) */
911#endif /* __MIG_check__Request__iokit_subsystem__ */
912#endif /* ( __MigTypeCheck ) */
913
914
915/* Routine io_service_get_matching_services */
916mig_internal novalue _Xio_service_get_matching_services
917 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
918 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
919 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
920{
921
922#ifdef __MigPackStructs
923#pragma pack(push, 4)
924#endif
925 typedef struct {
926 NDR_record_t NDR;
927 mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
928 mach_msg_type_number_t matchingCnt;
929 char matching[512];
930 mach_msg_trailer_t trailer;
931 char padding[0]; /* Avoid generating empty UData structs */
932 } RequestU __attribute__((unused));
933#ifdef __MigPackStructs
934#pragma pack(pop)
935#endif
936 typedef __RequestKData__io_service_get_matching_services_t RequestK;
937 typedef __RequestUData__io_service_get_matching_services_t __RequestU;
938 typedef __ReplyKData__io_service_get_matching_services_t ReplyK __attribute__((unused));
939 typedef __ReplyUData__io_service_get_matching_services_t ReplyU __attribute__((unused));
940 typedef __Reply__io_service_get_matching_services_t Reply __attribute__((unused));
941 typedef __Request__io_service_get_matching_services_t __Request __attribute__((unused));
942
943 /*
944 * typedef struct {
945 * mach_msg_header_t Head;
946 * NDR_record_t NDR;
947 * kern_return_t RetCode;
948 * } mig_reply_error_t;
949 */
950
951 RequestK *InKP = (RequestK *) InHeadP;
952 RequestU *In0UP = (RequestU *) InDataP;
953 ReplyK *OutKP = (ReplyK *) OutHeadP;
954 ReplyU *OutUP = (ReplyU *) OutDataP;
955 (void)OutUP;
956#ifdef __MIG_check__Request__io_service_get_matching_services_t__defined
957 kern_return_t check_result;
958#endif /* __MIG_check__Request__io_service_get_matching_services_t__defined */
959
960#if __MigKernelSpecificCode
961#if UseStaticTemplates
962 const static mach_msg_port_descriptor_t existingTemplate = {
963 /* name = */ MACH_PORT_NULL,
964 /* pad1 = */ 0,
965 /* pad2 = */ 0,
966 /* disp = */ 17,
967 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
968 };
969#endif /* UseStaticTemplates */
970
971#else
972#if UseStaticTemplates
973 const static mach_msg_port_descriptor_t existingTemplate = {
974 /* name = */ MACH_PORT_NULL,
975 /* pad1 = */ 0,
976 /* pad2 = */ 0,
977 /* disp = */ 19,
978 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
979 };
980#endif /* UseStaticTemplates */
981
982#endif /* __MigKernelSpecificCode */
983 kern_return_t RetCode;
984 io_object_t existing;
985
986 __DeclareRcvRpc(2804, "io_service_get_matching_services")
987 __BeforeRcvRpc(2804, "io_service_get_matching_services")
988
989#if defined(__MIG_check__Request__io_service_get_matching_services_t__defined)
990 check_result = __MIG_check__Request__io_service_get_matching_services_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
991 if (check_result != MACH_MSG_SUCCESS)
992 { MIG_RETURN_ERROR(OutKP, check_result); }
993#endif /* defined(__MIG_check__Request__io_service_get_matching_services_t__defined) */
994
995#if UseStaticTemplates
996 OutKP->existing = existingTemplate;
997#else /* UseStaticTemplates */
998#if __MigKernelSpecificCode
999 OutKP->existing.disposition = 17;
1000#else
1001 OutKP->existing.disposition = 19;
1002#endif /* __MigKernelSpecificCode */
1003#if !(defined(KERNEL) && defined(__LP64__))
1004 OutKP->existing.pad1 = 0;
1005#endif
1006 OutKP->existing.pad2 = 0;
1007 OutKP->existing.type = MACH_MSG_PORT_DESCRIPTOR;
1008#if defined(KERNEL)
1009 OutKP->existing.pad_end = 0;
1010#endif
1011#endif /* UseStaticTemplates */
1012
1013
1014 RetCode = is_io_service_get_matching_services(main_port: InKP->Head.msgh_request_port, matching: In0UP->matching, existing: &existing);
1015 if (RetCode != KERN_SUCCESS) {
1016 MIG_RETURN_ERROR(OutKP, RetCode);
1017 }
1018#if __MigKernelSpecificCode
1019#endif /* __MigKernelSpecificCode */
1020 OutKP->existing.name = (mach_port_t)iokit_make_object_port(obj: existing);
1021
1022
1023 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1024 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1025 OutKP->msgh_body.msgh_descriptor_count = 1;
1026 __AfterRcvRpc(2804, "io_service_get_matching_services")
1027}
1028
1029#if ( __MigTypeCheck )
1030#if __MIG_check__Request__iokit_subsystem__
1031#if !defined(__MIG_check__Request__io_registry_entry_get_property_t__defined)
1032#define __MIG_check__Request__io_registry_entry_get_property_t__defined
1033
1034mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_t(
1035 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_property_t *InKP,
1036 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_t *In0UP,
1037 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1038{
1039
1040 typedef __Request__io_registry_entry_get_property_t __Request;
1041 typedef __RequestUData__io_registry_entry_get_property_t __RequestU __attribute__((unused));
1042#if __MigTypeCheck
1043 unsigned int msgh_size;
1044#endif /* __MigTypeCheck */
1045
1046#if __MigTypeCheck
1047 msgh_size = InKP->Head.msgh_size;
1048 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1049 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
1050 return MIG_BAD_ARGUMENTS;
1051#endif /* __MigTypeCheck */
1052
1053#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_t__property_nameCnt__defined)
1054 if (In0UP->NDR.int_rep != NDR_record.int_rep)
1055 __NDR_convert__int_rep__Request__io_registry_entry_get_property_t__property_nameCnt(&In0UP->property_nameCnt, In0UP->NDR.int_rep);
1056#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_t__property_nameCnt__defined */
1057#if __MigTypeCheck
1058 if (In0UP->property_nameCnt > 128)
1059 return MIG_BAD_ARGUMENTS;
1060 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->property_nameCnt) ||
1061 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->property_nameCnt)))
1062 return MIG_BAD_ARGUMENTS;
1063#endif /* __MigTypeCheck */
1064
1065#if __MigTypeCheck
1066 {
1067 char * msg_limit = (char *) InTrailerP;
1068#if __MigKernelSpecificCode
1069 size_t strnlen_limit;
1070#else
1071 size_t memchr_limit;
1072#endif /* __MigKernelSpecificCode */
1073
1074#if __MigKernelSpecificCode
1075 strnlen_limit = min((msg_limit - In0UP->property_name), 128);
1076 if (( strnlen(s: In0UP->property_name, n: strnlen_limit) >= 128 + 1 ))
1077 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
1078#else
1079 memchr_limit = min((msg_limit - In0UP->property_name), 128);
1080 if (( memchr(In0UP->property_name, '\0', memchr_limit) == NULL ))
1081 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
1082#endif /* __MigKernelSpecificCode */
1083 }
1084#endif /* __MigTypeCheck */
1085
1086 return MACH_MSG_SUCCESS;
1087}
1088#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_t__defined) */
1089#endif /* __MIG_check__Request__iokit_subsystem__ */
1090#endif /* ( __MigTypeCheck ) */
1091
1092
1093/* Routine io_registry_entry_get_property */
1094mig_internal novalue _Xio_registry_entry_get_property
1095 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1096 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1097 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1098{
1099
1100#ifdef __MigPackStructs
1101#pragma pack(push, 4)
1102#endif
1103 typedef struct {
1104 NDR_record_t NDR;
1105 mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
1106 mach_msg_type_number_t property_nameCnt;
1107 char property_name[128];
1108 mach_msg_trailer_t trailer;
1109 char padding[0]; /* Avoid generating empty UData structs */
1110 } RequestU __attribute__((unused));
1111#ifdef __MigPackStructs
1112#pragma pack(pop)
1113#endif
1114 typedef __RequestKData__io_registry_entry_get_property_t RequestK;
1115 typedef __RequestUData__io_registry_entry_get_property_t __RequestU;
1116 typedef __ReplyKData__io_registry_entry_get_property_t ReplyK __attribute__((unused));
1117 typedef __ReplyUData__io_registry_entry_get_property_t ReplyU __attribute__((unused));
1118 typedef __Reply__io_registry_entry_get_property_t Reply __attribute__((unused));
1119 typedef __Request__io_registry_entry_get_property_t __Request __attribute__((unused));
1120
1121 /*
1122 * typedef struct {
1123 * mach_msg_header_t Head;
1124 * NDR_record_t NDR;
1125 * kern_return_t RetCode;
1126 * } mig_reply_error_t;
1127 */
1128
1129 RequestK *InKP = (RequestK *) InHeadP;
1130 RequestU *In0UP = (RequestU *) InDataP;
1131 ReplyK *OutKP = (ReplyK *) OutHeadP;
1132 ReplyU *OutUP = (ReplyU *) OutDataP;
1133 (void)OutUP;
1134#ifdef __MIG_check__Request__io_registry_entry_get_property_t__defined
1135 kern_return_t check_result;
1136#endif /* __MIG_check__Request__io_registry_entry_get_property_t__defined */
1137
1138#if __MigKernelSpecificCode
1139#if UseStaticTemplates
1140 const static mach_msg_ool_descriptor_t propertiesTemplate = {
1141 /* addr = */ (void *)0,
1142 /* size = */ 0,
1143 /* deal = */ FALSE,
1144 /* copy = */ MACH_MSG_PHYSICAL_COPY,
1145 /* pad2 = */ 0,
1146 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
1147 };
1148#endif /* UseStaticTemplates */
1149
1150#else
1151#if UseStaticTemplates
1152 const static mach_msg_ool_descriptor_t propertiesTemplate = {
1153 /* addr = */ (void *)0,
1154 /* size = */ 0,
1155 /* deal = */ FALSE,
1156 /* copy = */ MACH_MSG_PHYSICAL_COPY,
1157 /* pad2 = */ 0,
1158 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
1159 };
1160#endif /* UseStaticTemplates */
1161
1162#endif /* __MigKernelSpecificCode */
1163 kern_return_t RetCode;
1164 io_object_t registry_entry;
1165
1166 __DeclareRcvRpc(2805, "io_registry_entry_get_property")
1167 __BeforeRcvRpc(2805, "io_registry_entry_get_property")
1168
1169#if defined(__MIG_check__Request__io_registry_entry_get_property_t__defined)
1170 check_result = __MIG_check__Request__io_registry_entry_get_property_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1171 if (check_result != MACH_MSG_SUCCESS)
1172 { MIG_RETURN_ERROR(OutKP, check_result); }
1173#endif /* defined(__MIG_check__Request__io_registry_entry_get_property_t__defined) */
1174
1175#if UseStaticTemplates
1176 OutKP->properties = propertiesTemplate;
1177#else /* UseStaticTemplates */
1178 OutKP->properties.deallocate = FALSE;
1179 OutKP->properties.copy = MACH_MSG_PHYSICAL_COPY;
1180 OutKP->properties.pad1 = 0;
1181 OutKP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
1182#if defined(KERNEL) && !defined(__LP64__)
1183 OutKP->properties.pad_end = 0;
1184#endif
1185#endif /* UseStaticTemplates */
1186
1187
1188 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
1189
1190 RetCode = is_io_registry_entry_get_property(registry_entry, property_name: In0UP->property_name, properties: (io_buf_ptr_t *)&(OutKP->properties.address), propertiesCnt: &OutUP->propertiesCnt);
1191 iokit_remove_reference(obj: registry_entry);
1192 if (RetCode != KERN_SUCCESS) {
1193 MIG_RETURN_ERROR(OutKP, RetCode);
1194 }
1195#if __MigKernelSpecificCode
1196#endif /* __MigKernelSpecificCode */
1197 OutKP->properties.size = OutUP->propertiesCnt;
1198
1199
1200 OutUP->NDR = NDR_record;
1201
1202
1203 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1204 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1205 OutKP->msgh_body.msgh_descriptor_count = 1;
1206 __AfterRcvRpc(2805, "io_registry_entry_get_property")
1207}
1208
1209#if ( __MigTypeCheck )
1210#if __MIG_check__Request__iokit_subsystem__
1211#if !defined(__MIG_check__Request__io_registry_create_iterator_t__defined)
1212#define __MIG_check__Request__io_registry_create_iterator_t__defined
1213
1214mig_internal kern_return_t __MIG_check__Request__io_registry_create_iterator_t(
1215 __attribute__((__unused__)) __RequestKData__io_registry_create_iterator_t *InKP,
1216 __attribute__((__unused__)) __RequestUData__io_registry_create_iterator_t *In0UP,
1217 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1218 __attribute__((__unused__)) __RequestUData__io_registry_create_iterator_t **In1UPP)
1219{
1220
1221 typedef __Request__io_registry_create_iterator_t __Request;
1222 typedef __RequestUData__io_registry_create_iterator_t __RequestU __attribute__((unused));
1223 __RequestU *In1UP;
1224#if __MigTypeCheck
1225 unsigned int msgh_size;
1226#endif /* __MigTypeCheck */
1227 unsigned int msgh_size_delta;
1228
1229#if __MigTypeCheck
1230 msgh_size = InKP->Head.msgh_size;
1231 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1232 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
1233 return MIG_BAD_ARGUMENTS;
1234#endif /* __MigTypeCheck */
1235
1236#if defined(__NDR_convert__int_rep__Request__io_registry_create_iterator_t__planeCnt__defined)
1237 if (In0UP->NDR.int_rep != NDR_record.int_rep)
1238 __NDR_convert__int_rep__Request__io_registry_create_iterator_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
1239#endif /* __NDR_convert__int_rep__Request__io_registry_create_iterator_t__planeCnt__defined */
1240 msgh_size_delta = _WALIGN_(In0UP->planeCnt);
1241#if __MigTypeCheck
1242 if (In0UP->planeCnt > 128)
1243 return MIG_BAD_ARGUMENTS;
1244 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
1245 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
1246 return MIG_BAD_ARGUMENTS;
1247#endif /* __MigTypeCheck */
1248
1249 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
1250
1251#if __MigTypeCheck
1252 {
1253 char * msg_limit = (char *) InTrailerP;
1254#if __MigKernelSpecificCode
1255 size_t strnlen_limit;
1256#else
1257 size_t memchr_limit;
1258#endif /* __MigKernelSpecificCode */
1259
1260#if __MigKernelSpecificCode
1261 strnlen_limit = min((msg_limit - In0UP->plane), 128);
1262 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
1263 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
1264#else
1265 memchr_limit = min((msg_limit - In0UP->plane), 128);
1266 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
1267 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
1268#endif /* __MigKernelSpecificCode */
1269 }
1270#endif /* __MigTypeCheck */
1271
1272 return MACH_MSG_SUCCESS;
1273}
1274#endif /* !defined(__MIG_check__Request__io_registry_create_iterator_t__defined) */
1275#endif /* __MIG_check__Request__iokit_subsystem__ */
1276#endif /* ( __MigTypeCheck ) */
1277
1278
1279/* Routine io_registry_create_iterator */
1280mig_internal novalue _Xio_registry_create_iterator
1281 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1282 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1283 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1284{
1285
1286#ifdef __MigPackStructs
1287#pragma pack(push, 4)
1288#endif
1289 typedef struct {
1290 NDR_record_t NDR;
1291 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
1292 mach_msg_type_number_t planeCnt;
1293 char plane[128];
1294 uint32_t options;
1295 mach_msg_trailer_t trailer;
1296 char padding[0]; /* Avoid generating empty UData structs */
1297 } RequestU __attribute__((unused));
1298#ifdef __MigPackStructs
1299#pragma pack(pop)
1300#endif
1301 typedef __RequestKData__io_registry_create_iterator_t RequestK;
1302 typedef __RequestUData__io_registry_create_iterator_t __RequestU;
1303 typedef __ReplyKData__io_registry_create_iterator_t ReplyK __attribute__((unused));
1304 typedef __ReplyUData__io_registry_create_iterator_t ReplyU __attribute__((unused));
1305 typedef __Reply__io_registry_create_iterator_t Reply __attribute__((unused));
1306 typedef __Request__io_registry_create_iterator_t __Request __attribute__((unused));
1307
1308 /*
1309 * typedef struct {
1310 * mach_msg_header_t Head;
1311 * NDR_record_t NDR;
1312 * kern_return_t RetCode;
1313 * } mig_reply_error_t;
1314 */
1315
1316 RequestK *InKP = (RequestK *) InHeadP;
1317 RequestU *In0UP = (RequestU *) InDataP;
1318 RequestU *In1UP;
1319 ReplyK *OutKP = (ReplyK *) OutHeadP;
1320 ReplyU *OutUP = (ReplyU *) OutDataP;
1321 (void)OutUP;
1322#ifdef __MIG_check__Request__io_registry_create_iterator_t__defined
1323 kern_return_t check_result;
1324#endif /* __MIG_check__Request__io_registry_create_iterator_t__defined */
1325
1326#if __MigKernelSpecificCode
1327#if UseStaticTemplates
1328 const static mach_msg_port_descriptor_t iteratorTemplate = {
1329 /* name = */ MACH_PORT_NULL,
1330 /* pad1 = */ 0,
1331 /* pad2 = */ 0,
1332 /* disp = */ 17,
1333 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1334 };
1335#endif /* UseStaticTemplates */
1336
1337#else
1338#if UseStaticTemplates
1339 const static mach_msg_port_descriptor_t iteratorTemplate = {
1340 /* name = */ MACH_PORT_NULL,
1341 /* pad1 = */ 0,
1342 /* pad2 = */ 0,
1343 /* disp = */ 19,
1344 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1345 };
1346#endif /* UseStaticTemplates */
1347
1348#endif /* __MigKernelSpecificCode */
1349 kern_return_t RetCode;
1350 io_object_t iterator;
1351
1352 __DeclareRcvRpc(2806, "io_registry_create_iterator")
1353 __BeforeRcvRpc(2806, "io_registry_create_iterator")
1354
1355#if defined(__MIG_check__Request__io_registry_create_iterator_t__defined)
1356 check_result = __MIG_check__Request__io_registry_create_iterator_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
1357 if (check_result != MACH_MSG_SUCCESS)
1358 { MIG_RETURN_ERROR(OutKP, check_result); }
1359#endif /* defined(__MIG_check__Request__io_registry_create_iterator_t__defined) */
1360
1361#if UseStaticTemplates
1362 OutKP->iterator = iteratorTemplate;
1363#else /* UseStaticTemplates */
1364#if __MigKernelSpecificCode
1365 OutKP->iterator.disposition = 17;
1366#else
1367 OutKP->iterator.disposition = 19;
1368#endif /* __MigKernelSpecificCode */
1369#if !(defined(KERNEL) && defined(__LP64__))
1370 OutKP->iterator.pad1 = 0;
1371#endif
1372 OutKP->iterator.pad2 = 0;
1373 OutKP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
1374#if defined(KERNEL)
1375 OutKP->iterator.pad_end = 0;
1376#endif
1377#endif /* UseStaticTemplates */
1378
1379
1380 RetCode = is_io_registry_create_iterator(main_port: InKP->Head.msgh_request_port, plane: In0UP->plane, options: In1UP->options, iterator: &iterator);
1381 if (RetCode != KERN_SUCCESS) {
1382 MIG_RETURN_ERROR(OutKP, RetCode);
1383 }
1384#if __MigKernelSpecificCode
1385#endif /* __MigKernelSpecificCode */
1386 OutKP->iterator.name = (mach_port_t)iokit_make_object_port(obj: iterator);
1387
1388
1389 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1390 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1391 OutKP->msgh_body.msgh_descriptor_count = 1;
1392 __AfterRcvRpc(2806, "io_registry_create_iterator")
1393}
1394
1395#if ( __MigTypeCheck )
1396#if __MIG_check__Request__iokit_subsystem__
1397#if !defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined)
1398#define __MIG_check__Request__io_registry_iterator_enter_entry_t__defined
1399
1400mig_internal kern_return_t __MIG_check__Request__io_registry_iterator_enter_entry_t(
1401 __attribute__((__unused__)) __RequestKData__io_registry_iterator_enter_entry_t *InKP,
1402 __attribute__((__unused__)) __RequestUData__io_registry_iterator_enter_entry_t *In0UP,
1403 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1404{
1405
1406 typedef __Request__io_registry_iterator_enter_entry_t __Request;
1407 typedef __RequestUData__io_registry_iterator_enter_entry_t __RequestU __attribute__((unused));
1408#if __MigTypeCheck
1409 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1410 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1411 return MIG_BAD_ARGUMENTS;
1412#endif /* __MigTypeCheck */
1413
1414 return MACH_MSG_SUCCESS;
1415}
1416#endif /* !defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined) */
1417#endif /* __MIG_check__Request__iokit_subsystem__ */
1418#endif /* ( __MigTypeCheck ) */
1419
1420
1421/* Routine io_registry_iterator_enter_entry */
1422mig_internal novalue _Xio_registry_iterator_enter_entry
1423 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1424 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1425 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1426{
1427
1428#ifdef __MigPackStructs
1429#pragma pack(push, 4)
1430#endif
1431 typedef struct {
1432 mach_msg_trailer_t trailer;
1433 char padding[0]; /* Avoid generating empty UData structs */
1434 } RequestU __attribute__((unused));
1435#ifdef __MigPackStructs
1436#pragma pack(pop)
1437#endif
1438 typedef __RequestKData__io_registry_iterator_enter_entry_t RequestK;
1439 typedef __RequestUData__io_registry_iterator_enter_entry_t __RequestU;
1440 typedef __ReplyKData__io_registry_iterator_enter_entry_t ReplyK __attribute__((unused));
1441 typedef __ReplyUData__io_registry_iterator_enter_entry_t ReplyU __attribute__((unused));
1442 typedef __Reply__io_registry_iterator_enter_entry_t Reply __attribute__((unused));
1443 typedef __Request__io_registry_iterator_enter_entry_t __Request __attribute__((unused));
1444
1445 /*
1446 * typedef struct {
1447 * mach_msg_header_t Head;
1448 * NDR_record_t NDR;
1449 * kern_return_t RetCode;
1450 * } mig_reply_error_t;
1451 */
1452
1453 RequestK *InKP = (RequestK *) InHeadP;
1454 RequestU *In0UP = (RequestU *) InDataP;
1455 ReplyK *OutKP = (ReplyK *) OutHeadP;
1456 ReplyU *OutUP = (ReplyU *) OutDataP;
1457 (void)OutUP;
1458#ifdef __MIG_check__Request__io_registry_iterator_enter_entry_t__defined
1459 kern_return_t check_result;
1460#endif /* __MIG_check__Request__io_registry_iterator_enter_entry_t__defined */
1461
1462#if __MigKernelSpecificCode
1463#else
1464#endif /* __MigKernelSpecificCode */
1465 io_object_t iterator;
1466
1467 __DeclareRcvRpc(2807, "io_registry_iterator_enter_entry")
1468 __BeforeRcvRpc(2807, "io_registry_iterator_enter_entry")
1469
1470#if defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined)
1471 check_result = __MIG_check__Request__io_registry_iterator_enter_entry_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1472 if (check_result != MACH_MSG_SUCCESS)
1473 { MIG_RETURN_ERROR(OutKP, check_result); }
1474#endif /* defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined) */
1475
1476 iterator = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
1477
1478 OutUP->RetCode = is_io_registry_iterator_enter_entry(iterator);
1479 iokit_remove_reference(obj: iterator);
1480#if __MigKernelSpecificCode
1481#endif /* __MigKernelSpecificCode */
1482
1483 OutUP->NDR = NDR_record;
1484
1485
1486 __AfterRcvRpc(2807, "io_registry_iterator_enter_entry")
1487}
1488
1489#if ( __MigTypeCheck )
1490#if __MIG_check__Request__iokit_subsystem__
1491#if !defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined)
1492#define __MIG_check__Request__io_registry_iterator_exit_entry_t__defined
1493
1494mig_internal kern_return_t __MIG_check__Request__io_registry_iterator_exit_entry_t(
1495 __attribute__((__unused__)) __RequestKData__io_registry_iterator_exit_entry_t *InKP,
1496 __attribute__((__unused__)) __RequestUData__io_registry_iterator_exit_entry_t *In0UP,
1497 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1498{
1499
1500 typedef __Request__io_registry_iterator_exit_entry_t __Request;
1501 typedef __RequestUData__io_registry_iterator_exit_entry_t __RequestU __attribute__((unused));
1502#if __MigTypeCheck
1503 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1504 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1505 return MIG_BAD_ARGUMENTS;
1506#endif /* __MigTypeCheck */
1507
1508 return MACH_MSG_SUCCESS;
1509}
1510#endif /* !defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined) */
1511#endif /* __MIG_check__Request__iokit_subsystem__ */
1512#endif /* ( __MigTypeCheck ) */
1513
1514
1515/* Routine io_registry_iterator_exit_entry */
1516mig_internal novalue _Xio_registry_iterator_exit_entry
1517 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1518 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1519 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1520{
1521
1522#ifdef __MigPackStructs
1523#pragma pack(push, 4)
1524#endif
1525 typedef struct {
1526 mach_msg_trailer_t trailer;
1527 char padding[0]; /* Avoid generating empty UData structs */
1528 } RequestU __attribute__((unused));
1529#ifdef __MigPackStructs
1530#pragma pack(pop)
1531#endif
1532 typedef __RequestKData__io_registry_iterator_exit_entry_t RequestK;
1533 typedef __RequestUData__io_registry_iterator_exit_entry_t __RequestU;
1534 typedef __ReplyKData__io_registry_iterator_exit_entry_t ReplyK __attribute__((unused));
1535 typedef __ReplyUData__io_registry_iterator_exit_entry_t ReplyU __attribute__((unused));
1536 typedef __Reply__io_registry_iterator_exit_entry_t Reply __attribute__((unused));
1537 typedef __Request__io_registry_iterator_exit_entry_t __Request __attribute__((unused));
1538
1539 /*
1540 * typedef struct {
1541 * mach_msg_header_t Head;
1542 * NDR_record_t NDR;
1543 * kern_return_t RetCode;
1544 * } mig_reply_error_t;
1545 */
1546
1547 RequestK *InKP = (RequestK *) InHeadP;
1548 RequestU *In0UP = (RequestU *) InDataP;
1549 ReplyK *OutKP = (ReplyK *) OutHeadP;
1550 ReplyU *OutUP = (ReplyU *) OutDataP;
1551 (void)OutUP;
1552#ifdef __MIG_check__Request__io_registry_iterator_exit_entry_t__defined
1553 kern_return_t check_result;
1554#endif /* __MIG_check__Request__io_registry_iterator_exit_entry_t__defined */
1555
1556#if __MigKernelSpecificCode
1557#else
1558#endif /* __MigKernelSpecificCode */
1559 io_object_t iterator;
1560
1561 __DeclareRcvRpc(2808, "io_registry_iterator_exit_entry")
1562 __BeforeRcvRpc(2808, "io_registry_iterator_exit_entry")
1563
1564#if defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined)
1565 check_result = __MIG_check__Request__io_registry_iterator_exit_entry_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1566 if (check_result != MACH_MSG_SUCCESS)
1567 { MIG_RETURN_ERROR(OutKP, check_result); }
1568#endif /* defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined) */
1569
1570 iterator = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
1571
1572 OutUP->RetCode = is_io_registry_iterator_exit_entry(iterator);
1573 iokit_remove_reference(obj: iterator);
1574#if __MigKernelSpecificCode
1575#endif /* __MigKernelSpecificCode */
1576
1577 OutUP->NDR = NDR_record;
1578
1579
1580 __AfterRcvRpc(2808, "io_registry_iterator_exit_entry")
1581}
1582
1583#if ( __MigTypeCheck )
1584#if __MIG_check__Request__iokit_subsystem__
1585#if !defined(__MIG_check__Request__io_registry_entry_from_path_t__defined)
1586#define __MIG_check__Request__io_registry_entry_from_path_t__defined
1587
1588mig_internal kern_return_t __MIG_check__Request__io_registry_entry_from_path_t(
1589 __attribute__((__unused__)) __RequestKData__io_registry_entry_from_path_t *InKP,
1590 __attribute__((__unused__)) __RequestUData__io_registry_entry_from_path_t *In0UP,
1591 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1592{
1593
1594 typedef __Request__io_registry_entry_from_path_t __Request;
1595 typedef __RequestUData__io_registry_entry_from_path_t __RequestU __attribute__((unused));
1596#if __MigTypeCheck
1597 unsigned int msgh_size;
1598#endif /* __MigTypeCheck */
1599
1600#if __MigTypeCheck
1601 msgh_size = InKP->Head.msgh_size;
1602 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1603 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
1604 return MIG_BAD_ARGUMENTS;
1605#endif /* __MigTypeCheck */
1606
1607#if defined(__NDR_convert__int_rep__Request__io_registry_entry_from_path_t__pathCnt__defined)
1608 if (In0UP->NDR.int_rep != NDR_record.int_rep)
1609 __NDR_convert__int_rep__Request__io_registry_entry_from_path_t__pathCnt(&In0UP->pathCnt, In0UP->NDR.int_rep);
1610#endif /* __NDR_convert__int_rep__Request__io_registry_entry_from_path_t__pathCnt__defined */
1611#if __MigTypeCheck
1612 if (In0UP->pathCnt > 512)
1613 return MIG_BAD_ARGUMENTS;
1614 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0UP->pathCnt) ||
1615 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0UP->pathCnt)))
1616 return MIG_BAD_ARGUMENTS;
1617#endif /* __MigTypeCheck */
1618
1619#if __MigTypeCheck
1620 {
1621 char * msg_limit = (char *) InTrailerP;
1622#if __MigKernelSpecificCode
1623 size_t strnlen_limit;
1624#else
1625 size_t memchr_limit;
1626#endif /* __MigKernelSpecificCode */
1627
1628#if __MigKernelSpecificCode
1629 strnlen_limit = min((msg_limit - In0UP->path), 512);
1630 if (( strnlen(s: In0UP->path, n: strnlen_limit) >= 512 + 1 ))
1631 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
1632#else
1633 memchr_limit = min((msg_limit - In0UP->path), 512);
1634 if (( memchr(In0UP->path, '\0', memchr_limit) == NULL ))
1635 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
1636#endif /* __MigKernelSpecificCode */
1637 }
1638#endif /* __MigTypeCheck */
1639
1640 return MACH_MSG_SUCCESS;
1641}
1642#endif /* !defined(__MIG_check__Request__io_registry_entry_from_path_t__defined) */
1643#endif /* __MIG_check__Request__iokit_subsystem__ */
1644#endif /* ( __MigTypeCheck ) */
1645
1646
1647/* Routine io_registry_entry_from_path */
1648mig_internal novalue _Xio_registry_entry_from_path
1649 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1650 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1651 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1652{
1653
1654#ifdef __MigPackStructs
1655#pragma pack(push, 4)
1656#endif
1657 typedef struct {
1658 NDR_record_t NDR;
1659 mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
1660 mach_msg_type_number_t pathCnt;
1661 char path[512];
1662 mach_msg_trailer_t trailer;
1663 char padding[0]; /* Avoid generating empty UData structs */
1664 } RequestU __attribute__((unused));
1665#ifdef __MigPackStructs
1666#pragma pack(pop)
1667#endif
1668 typedef __RequestKData__io_registry_entry_from_path_t RequestK;
1669 typedef __RequestUData__io_registry_entry_from_path_t __RequestU;
1670 typedef __ReplyKData__io_registry_entry_from_path_t ReplyK __attribute__((unused));
1671 typedef __ReplyUData__io_registry_entry_from_path_t ReplyU __attribute__((unused));
1672 typedef __Reply__io_registry_entry_from_path_t Reply __attribute__((unused));
1673 typedef __Request__io_registry_entry_from_path_t __Request __attribute__((unused));
1674
1675 /*
1676 * typedef struct {
1677 * mach_msg_header_t Head;
1678 * NDR_record_t NDR;
1679 * kern_return_t RetCode;
1680 * } mig_reply_error_t;
1681 */
1682
1683 RequestK *InKP = (RequestK *) InHeadP;
1684 RequestU *In0UP = (RequestU *) InDataP;
1685 ReplyK *OutKP = (ReplyK *) OutHeadP;
1686 ReplyU *OutUP = (ReplyU *) OutDataP;
1687 (void)OutUP;
1688#ifdef __MIG_check__Request__io_registry_entry_from_path_t__defined
1689 kern_return_t check_result;
1690#endif /* __MIG_check__Request__io_registry_entry_from_path_t__defined */
1691
1692#if __MigKernelSpecificCode
1693#if UseStaticTemplates
1694 const static mach_msg_port_descriptor_t registry_entryTemplate = {
1695 /* name = */ MACH_PORT_NULL,
1696 /* pad1 = */ 0,
1697 /* pad2 = */ 0,
1698 /* disp = */ 17,
1699 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1700 };
1701#endif /* UseStaticTemplates */
1702
1703#else
1704#if UseStaticTemplates
1705 const static mach_msg_port_descriptor_t registry_entryTemplate = {
1706 /* name = */ MACH_PORT_NULL,
1707 /* pad1 = */ 0,
1708 /* pad2 = */ 0,
1709 /* disp = */ 19,
1710 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
1711 };
1712#endif /* UseStaticTemplates */
1713
1714#endif /* __MigKernelSpecificCode */
1715 kern_return_t RetCode;
1716 io_object_t registry_entry;
1717
1718 __DeclareRcvRpc(2809, "io_registry_entry_from_path")
1719 __BeforeRcvRpc(2809, "io_registry_entry_from_path")
1720
1721#if defined(__MIG_check__Request__io_registry_entry_from_path_t__defined)
1722 check_result = __MIG_check__Request__io_registry_entry_from_path_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1723 if (check_result != MACH_MSG_SUCCESS)
1724 { MIG_RETURN_ERROR(OutKP, check_result); }
1725#endif /* defined(__MIG_check__Request__io_registry_entry_from_path_t__defined) */
1726
1727#if UseStaticTemplates
1728 OutKP->registry_entry = registry_entryTemplate;
1729#else /* UseStaticTemplates */
1730#if __MigKernelSpecificCode
1731 OutKP->registry_entry.disposition = 17;
1732#else
1733 OutKP->registry_entry.disposition = 19;
1734#endif /* __MigKernelSpecificCode */
1735#if !(defined(KERNEL) && defined(__LP64__))
1736 OutKP->registry_entry.pad1 = 0;
1737#endif
1738 OutKP->registry_entry.pad2 = 0;
1739 OutKP->registry_entry.type = MACH_MSG_PORT_DESCRIPTOR;
1740#if defined(KERNEL)
1741 OutKP->registry_entry.pad_end = 0;
1742#endif
1743#endif /* UseStaticTemplates */
1744
1745
1746 RetCode = is_io_registry_entry_from_path(main_port: InKP->Head.msgh_request_port, path: In0UP->path, registry_entry: &registry_entry);
1747 if (RetCode != KERN_SUCCESS) {
1748 MIG_RETURN_ERROR(OutKP, RetCode);
1749 }
1750#if __MigKernelSpecificCode
1751#endif /* __MigKernelSpecificCode */
1752 OutKP->registry_entry.name = (mach_port_t)iokit_make_object_port(obj: registry_entry);
1753
1754
1755 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
1756 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
1757 OutKP->msgh_body.msgh_descriptor_count = 1;
1758 __AfterRcvRpc(2809, "io_registry_entry_from_path")
1759}
1760
1761#if ( __MigTypeCheck )
1762#if __MIG_check__Request__iokit_subsystem__
1763#if !defined(__MIG_check__Request__io_registry_entry_get_name_t__defined)
1764#define __MIG_check__Request__io_registry_entry_get_name_t__defined
1765
1766mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_name_t(
1767 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_name_t *InKP,
1768 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_name_t *In0UP,
1769 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1770{
1771
1772 typedef __Request__io_registry_entry_get_name_t __Request;
1773 typedef __RequestUData__io_registry_entry_get_name_t __RequestU __attribute__((unused));
1774#if __MigTypeCheck
1775 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1776 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1777 return MIG_BAD_ARGUMENTS;
1778#endif /* __MigTypeCheck */
1779
1780 return MACH_MSG_SUCCESS;
1781}
1782#endif /* !defined(__MIG_check__Request__io_registry_entry_get_name_t__defined) */
1783#endif /* __MIG_check__Request__iokit_subsystem__ */
1784#endif /* ( __MigTypeCheck ) */
1785
1786
1787/* Routine io_registry_entry_get_name */
1788mig_internal novalue _Xio_registry_entry_get_name
1789 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1790 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1791 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1792{
1793
1794#ifdef __MigPackStructs
1795#pragma pack(push, 4)
1796#endif
1797 typedef struct {
1798 mach_msg_trailer_t trailer;
1799 char padding[0]; /* Avoid generating empty UData structs */
1800 } RequestU __attribute__((unused));
1801#ifdef __MigPackStructs
1802#pragma pack(pop)
1803#endif
1804 typedef __RequestKData__io_registry_entry_get_name_t RequestK;
1805 typedef __RequestUData__io_registry_entry_get_name_t __RequestU;
1806 typedef __ReplyKData__io_registry_entry_get_name_t ReplyK __attribute__((unused));
1807 typedef __ReplyUData__io_registry_entry_get_name_t ReplyU __attribute__((unused));
1808 typedef __Reply__io_registry_entry_get_name_t Reply __attribute__((unused));
1809 typedef __Request__io_registry_entry_get_name_t __Request __attribute__((unused));
1810
1811 /*
1812 * typedef struct {
1813 * mach_msg_header_t Head;
1814 * NDR_record_t NDR;
1815 * kern_return_t RetCode;
1816 * } mig_reply_error_t;
1817 */
1818
1819 RequestK *InKP = (RequestK *) InHeadP;
1820 RequestU *In0UP = (RequestU *) InDataP;
1821 ReplyK *OutKP = (ReplyK *) OutHeadP;
1822 ReplyU *OutUP = (ReplyU *) OutDataP;
1823 (void)OutUP;
1824#ifdef __MIG_check__Request__io_registry_entry_get_name_t__defined
1825 kern_return_t check_result;
1826#endif /* __MIG_check__Request__io_registry_entry_get_name_t__defined */
1827
1828#if __MigKernelSpecificCode
1829#else
1830#endif /* __MigKernelSpecificCode */
1831 io_object_t registry_entry;
1832
1833 __DeclareRcvRpc(2810, "io_registry_entry_get_name")
1834 __BeforeRcvRpc(2810, "io_registry_entry_get_name")
1835
1836#if defined(__MIG_check__Request__io_registry_entry_get_name_t__defined)
1837 check_result = __MIG_check__Request__io_registry_entry_get_name_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1838 if (check_result != MACH_MSG_SUCCESS)
1839 { MIG_RETURN_ERROR(OutKP, check_result); }
1840#endif /* defined(__MIG_check__Request__io_registry_entry_get_name_t__defined) */
1841
1842 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
1843
1844 OutUP->RetCode = is_io_registry_entry_get_name(registry_entry, name: OutUP->name);
1845 iokit_remove_reference(obj: registry_entry);
1846 if (OutUP->RetCode != KERN_SUCCESS) {
1847 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
1848 }
1849#if __MigKernelSpecificCode
1850#endif /* __MigKernelSpecificCode */
1851
1852 OutUP->NDR = NDR_record;
1853
1854#ifdef __LP64__
1855 {
1856 size_t strLength = strlen(s: OutUP->name) + 1;
1857 if (strLength > 0xffffffff)
1858 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
1859 OutUP->nameCnt = (mach_msg_type_number_t) strLength;
1860 }
1861#else
1862 OutUP->nameCnt = (mach_msg_type_number_t) strlen(OutUP->name) + 1;
1863#endif /* __LP64__ */
1864 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutUP->nameCnt + 3) & ~3));
1865
1866 __AfterRcvRpc(2810, "io_registry_entry_get_name")
1867}
1868
1869#if ( __MigTypeCheck )
1870#if __MIG_check__Request__iokit_subsystem__
1871#if !defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined)
1872#define __MIG_check__Request__io_registry_entry_get_properties_t__defined
1873
1874mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_properties_t(
1875 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_properties_t *InKP,
1876 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_properties_t *In0UP,
1877 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
1878{
1879
1880 typedef __Request__io_registry_entry_get_properties_t __Request;
1881 typedef __RequestUData__io_registry_entry_get_properties_t __RequestU __attribute__((unused));
1882#if __MigTypeCheck
1883 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
1884 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
1885 return MIG_BAD_ARGUMENTS;
1886#endif /* __MigTypeCheck */
1887
1888 return MACH_MSG_SUCCESS;
1889}
1890#endif /* !defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined) */
1891#endif /* __MIG_check__Request__iokit_subsystem__ */
1892#endif /* ( __MigTypeCheck ) */
1893
1894
1895/* Routine io_registry_entry_get_properties */
1896mig_internal novalue _Xio_registry_entry_get_properties
1897 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
1898 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
1899 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
1900{
1901
1902#ifdef __MigPackStructs
1903#pragma pack(push, 4)
1904#endif
1905 typedef struct {
1906 mach_msg_trailer_t trailer;
1907 char padding[0]; /* Avoid generating empty UData structs */
1908 } RequestU __attribute__((unused));
1909#ifdef __MigPackStructs
1910#pragma pack(pop)
1911#endif
1912 typedef __RequestKData__io_registry_entry_get_properties_t RequestK;
1913 typedef __RequestUData__io_registry_entry_get_properties_t __RequestU;
1914 typedef __ReplyKData__io_registry_entry_get_properties_t ReplyK __attribute__((unused));
1915 typedef __ReplyUData__io_registry_entry_get_properties_t ReplyU __attribute__((unused));
1916 typedef __Reply__io_registry_entry_get_properties_t Reply __attribute__((unused));
1917 typedef __Request__io_registry_entry_get_properties_t __Request __attribute__((unused));
1918
1919 /*
1920 * typedef struct {
1921 * mach_msg_header_t Head;
1922 * NDR_record_t NDR;
1923 * kern_return_t RetCode;
1924 * } mig_reply_error_t;
1925 */
1926
1927 RequestK *InKP = (RequestK *) InHeadP;
1928 RequestU *In0UP = (RequestU *) InDataP;
1929 ReplyK *OutKP = (ReplyK *) OutHeadP;
1930 ReplyU *OutUP = (ReplyU *) OutDataP;
1931 (void)OutUP;
1932#ifdef __MIG_check__Request__io_registry_entry_get_properties_t__defined
1933 kern_return_t check_result;
1934#endif /* __MIG_check__Request__io_registry_entry_get_properties_t__defined */
1935
1936#if __MigKernelSpecificCode
1937#if UseStaticTemplates
1938 const static mach_msg_ool_descriptor_t propertiesTemplate = {
1939 /* addr = */ (void *)0,
1940 /* size = */ 0,
1941 /* deal = */ FALSE,
1942 /* copy = */ MACH_MSG_PHYSICAL_COPY,
1943 /* pad2 = */ 0,
1944 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
1945 };
1946#endif /* UseStaticTemplates */
1947
1948#else
1949#if UseStaticTemplates
1950 const static mach_msg_ool_descriptor_t propertiesTemplate = {
1951 /* addr = */ (void *)0,
1952 /* size = */ 0,
1953 /* deal = */ FALSE,
1954 /* copy = */ MACH_MSG_PHYSICAL_COPY,
1955 /* pad2 = */ 0,
1956 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
1957 };
1958#endif /* UseStaticTemplates */
1959
1960#endif /* __MigKernelSpecificCode */
1961 kern_return_t RetCode;
1962 io_object_t registry_entry;
1963
1964 __DeclareRcvRpc(2811, "io_registry_entry_get_properties")
1965 __BeforeRcvRpc(2811, "io_registry_entry_get_properties")
1966
1967#if defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined)
1968 check_result = __MIG_check__Request__io_registry_entry_get_properties_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
1969 if (check_result != MACH_MSG_SUCCESS)
1970 { MIG_RETURN_ERROR(OutKP, check_result); }
1971#endif /* defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined) */
1972
1973#if UseStaticTemplates
1974 OutKP->properties = propertiesTemplate;
1975#else /* UseStaticTemplates */
1976 OutKP->properties.deallocate = FALSE;
1977 OutKP->properties.copy = MACH_MSG_PHYSICAL_COPY;
1978 OutKP->properties.pad1 = 0;
1979 OutKP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
1980#if defined(KERNEL) && !defined(__LP64__)
1981 OutKP->properties.pad_end = 0;
1982#endif
1983#endif /* UseStaticTemplates */
1984
1985
1986 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
1987
1988 RetCode = is_io_registry_entry_get_properties(registry_entry, properties: (io_buf_ptr_t *)&(OutKP->properties.address), propertiesCnt: &OutUP->propertiesCnt);
1989 iokit_remove_reference(obj: registry_entry);
1990 if (RetCode != KERN_SUCCESS) {
1991 MIG_RETURN_ERROR(OutKP, RetCode);
1992 }
1993#if __MigKernelSpecificCode
1994#endif /* __MigKernelSpecificCode */
1995 OutKP->properties.size = OutUP->propertiesCnt;
1996
1997
1998 OutUP->NDR = NDR_record;
1999
2000
2001 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2002 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2003 OutKP->msgh_body.msgh_descriptor_count = 1;
2004 __AfterRcvRpc(2811, "io_registry_entry_get_properties")
2005}
2006
2007#if ( __MigTypeCheck )
2008#if __MIG_check__Request__iokit_subsystem__
2009#if !defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined)
2010#define __MIG_check__Request__io_registry_entry_get_property_bytes_t__defined
2011
2012mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_bytes_t(
2013 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_property_bytes_t *InKP,
2014 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bytes_t *In0UP,
2015 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2016 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bytes_t **In1UPP)
2017{
2018
2019 typedef __Request__io_registry_entry_get_property_bytes_t __Request;
2020 typedef __RequestUData__io_registry_entry_get_property_bytes_t __RequestU __attribute__((unused));
2021 __RequestU *In1UP;
2022#if __MigTypeCheck
2023 unsigned int msgh_size;
2024#endif /* __MigTypeCheck */
2025 unsigned int msgh_size_delta;
2026
2027#if __MigTypeCheck
2028 msgh_size = InKP->Head.msgh_size;
2029 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2030 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
2031 return MIG_BAD_ARGUMENTS;
2032#endif /* __MigTypeCheck */
2033
2034#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bytes_t__property_nameCnt__defined)
2035 if (In0UP->NDR.int_rep != NDR_record.int_rep)
2036 __NDR_convert__int_rep__Request__io_registry_entry_get_property_bytes_t__property_nameCnt(&In0UP->property_nameCnt, In0UP->NDR.int_rep);
2037#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bytes_t__property_nameCnt__defined */
2038 msgh_size_delta = _WALIGN_(In0UP->property_nameCnt);
2039#if __MigTypeCheck
2040 if (In0UP->property_nameCnt > 128)
2041 return MIG_BAD_ARGUMENTS;
2042 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->property_nameCnt) ||
2043 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->property_nameCnt)))
2044 return MIG_BAD_ARGUMENTS;
2045#endif /* __MigTypeCheck */
2046
2047 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
2048
2049#if __MigTypeCheck
2050 {
2051 char * msg_limit = (char *) InTrailerP;
2052#if __MigKernelSpecificCode
2053 size_t strnlen_limit;
2054#else
2055 size_t memchr_limit;
2056#endif /* __MigKernelSpecificCode */
2057
2058#if __MigKernelSpecificCode
2059 strnlen_limit = min((msg_limit - In0UP->property_name), 128);
2060 if (( strnlen(s: In0UP->property_name, n: strnlen_limit) >= 128 + 1 ))
2061 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
2062#else
2063 memchr_limit = min((msg_limit - In0UP->property_name), 128);
2064 if (( memchr(In0UP->property_name, '\0', memchr_limit) == NULL ))
2065 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
2066#endif /* __MigKernelSpecificCode */
2067 }
2068#endif /* __MigTypeCheck */
2069
2070 return MACH_MSG_SUCCESS;
2071}
2072#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined) */
2073#endif /* __MIG_check__Request__iokit_subsystem__ */
2074#endif /* ( __MigTypeCheck ) */
2075
2076
2077/* Routine io_registry_entry_get_property_bytes */
2078mig_internal novalue _Xio_registry_entry_get_property_bytes
2079 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2080 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2081 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2082{
2083
2084#ifdef __MigPackStructs
2085#pragma pack(push, 4)
2086#endif
2087 typedef struct {
2088 NDR_record_t NDR;
2089 mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
2090 mach_msg_type_number_t property_nameCnt;
2091 char property_name[128];
2092 mach_msg_type_number_t dataCnt;
2093 mach_msg_trailer_t trailer;
2094 char padding[0]; /* Avoid generating empty UData structs */
2095 } RequestU __attribute__((unused));
2096#ifdef __MigPackStructs
2097#pragma pack(pop)
2098#endif
2099 typedef __RequestKData__io_registry_entry_get_property_bytes_t RequestK;
2100 typedef __RequestUData__io_registry_entry_get_property_bytes_t __RequestU;
2101 typedef __ReplyKData__io_registry_entry_get_property_bytes_t ReplyK __attribute__((unused));
2102 typedef __ReplyUData__io_registry_entry_get_property_bytes_t ReplyU __attribute__((unused));
2103 typedef __Reply__io_registry_entry_get_property_bytes_t Reply __attribute__((unused));
2104 typedef __Request__io_registry_entry_get_property_bytes_t __Request __attribute__((unused));
2105
2106 /*
2107 * typedef struct {
2108 * mach_msg_header_t Head;
2109 * NDR_record_t NDR;
2110 * kern_return_t RetCode;
2111 * } mig_reply_error_t;
2112 */
2113
2114 RequestK *InKP = (RequestK *) InHeadP;
2115 RequestU *In0UP = (RequestU *) InDataP;
2116 RequestU *In1UP;
2117 ReplyK *OutKP = (ReplyK *) OutHeadP;
2118 ReplyU *OutUP = (ReplyU *) OutDataP;
2119 (void)OutUP;
2120#ifdef __MIG_check__Request__io_registry_entry_get_property_bytes_t__defined
2121 kern_return_t check_result;
2122#endif /* __MIG_check__Request__io_registry_entry_get_property_bytes_t__defined */
2123
2124#if __MigKernelSpecificCode
2125#else
2126#endif /* __MigKernelSpecificCode */
2127 io_object_t registry_entry;
2128
2129 __DeclareRcvRpc(2812, "io_registry_entry_get_property_bytes")
2130 __BeforeRcvRpc(2812, "io_registry_entry_get_property_bytes")
2131
2132#if defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined)
2133 check_result = __MIG_check__Request__io_registry_entry_get_property_bytes_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
2134 if (check_result != MACH_MSG_SUCCESS)
2135 { MIG_RETURN_ERROR(OutKP, check_result); }
2136#endif /* defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined) */
2137
2138 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
2139
2140 OutUP->dataCnt = 4096;
2141 if (In1UP->dataCnt < OutUP->dataCnt)
2142 OutUP->dataCnt = In1UP->dataCnt;
2143
2144 OutUP->RetCode = is_io_registry_entry_get_property_bytes(registry_entry, property_name: In0UP->property_name, data: OutUP->data, dataCnt: &OutUP->dataCnt);
2145 iokit_remove_reference(obj: registry_entry);
2146 if (OutUP->RetCode != KERN_SUCCESS) {
2147 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2148 }
2149#if __MigKernelSpecificCode
2150#endif /* __MigKernelSpecificCode */
2151
2152 OutUP->NDR = NDR_record;
2153
2154 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + (_WALIGN_((OutUP->dataCnt + 3) & ~3));
2155
2156 __AfterRcvRpc(2812, "io_registry_entry_get_property_bytes")
2157}
2158
2159#if ( __MigTypeCheck )
2160#if __MIG_check__Request__iokit_subsystem__
2161#if !defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined)
2162#define __MIG_check__Request__io_registry_entry_get_child_iterator_t__defined
2163
2164mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_child_iterator_t(
2165 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_child_iterator_t *InKP,
2166 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_child_iterator_t *In0UP,
2167 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2168{
2169
2170 typedef __Request__io_registry_entry_get_child_iterator_t __Request;
2171 typedef __RequestUData__io_registry_entry_get_child_iterator_t __RequestU __attribute__((unused));
2172#if __MigTypeCheck
2173 unsigned int msgh_size;
2174#endif /* __MigTypeCheck */
2175
2176#if __MigTypeCheck
2177 msgh_size = InKP->Head.msgh_size;
2178 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2179 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
2180 return MIG_BAD_ARGUMENTS;
2181#endif /* __MigTypeCheck */
2182
2183#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_child_iterator_t__planeCnt__defined)
2184 if (In0UP->NDR.int_rep != NDR_record.int_rep)
2185 __NDR_convert__int_rep__Request__io_registry_entry_get_child_iterator_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
2186#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_child_iterator_t__planeCnt__defined */
2187#if __MigTypeCheck
2188 if (In0UP->planeCnt > 128)
2189 return MIG_BAD_ARGUMENTS;
2190 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
2191 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
2192 return MIG_BAD_ARGUMENTS;
2193#endif /* __MigTypeCheck */
2194
2195#if __MigTypeCheck
2196 {
2197 char * msg_limit = (char *) InTrailerP;
2198#if __MigKernelSpecificCode
2199 size_t strnlen_limit;
2200#else
2201 size_t memchr_limit;
2202#endif /* __MigKernelSpecificCode */
2203
2204#if __MigKernelSpecificCode
2205 strnlen_limit = min((msg_limit - In0UP->plane), 128);
2206 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
2207 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
2208#else
2209 memchr_limit = min((msg_limit - In0UP->plane), 128);
2210 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
2211 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
2212#endif /* __MigKernelSpecificCode */
2213 }
2214#endif /* __MigTypeCheck */
2215
2216 return MACH_MSG_SUCCESS;
2217}
2218#endif /* !defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined) */
2219#endif /* __MIG_check__Request__iokit_subsystem__ */
2220#endif /* ( __MigTypeCheck ) */
2221
2222
2223/* Routine io_registry_entry_get_child_iterator */
2224mig_internal novalue _Xio_registry_entry_get_child_iterator
2225 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2226 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2227 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2228{
2229
2230#ifdef __MigPackStructs
2231#pragma pack(push, 4)
2232#endif
2233 typedef struct {
2234 NDR_record_t NDR;
2235 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
2236 mach_msg_type_number_t planeCnt;
2237 char plane[128];
2238 mach_msg_trailer_t trailer;
2239 char padding[0]; /* Avoid generating empty UData structs */
2240 } RequestU __attribute__((unused));
2241#ifdef __MigPackStructs
2242#pragma pack(pop)
2243#endif
2244 typedef __RequestKData__io_registry_entry_get_child_iterator_t RequestK;
2245 typedef __RequestUData__io_registry_entry_get_child_iterator_t __RequestU;
2246 typedef __ReplyKData__io_registry_entry_get_child_iterator_t ReplyK __attribute__((unused));
2247 typedef __ReplyUData__io_registry_entry_get_child_iterator_t ReplyU __attribute__((unused));
2248 typedef __Reply__io_registry_entry_get_child_iterator_t Reply __attribute__((unused));
2249 typedef __Request__io_registry_entry_get_child_iterator_t __Request __attribute__((unused));
2250
2251 /*
2252 * typedef struct {
2253 * mach_msg_header_t Head;
2254 * NDR_record_t NDR;
2255 * kern_return_t RetCode;
2256 * } mig_reply_error_t;
2257 */
2258
2259 RequestK *InKP = (RequestK *) InHeadP;
2260 RequestU *In0UP = (RequestU *) InDataP;
2261 ReplyK *OutKP = (ReplyK *) OutHeadP;
2262 ReplyU *OutUP = (ReplyU *) OutDataP;
2263 (void)OutUP;
2264#ifdef __MIG_check__Request__io_registry_entry_get_child_iterator_t__defined
2265 kern_return_t check_result;
2266#endif /* __MIG_check__Request__io_registry_entry_get_child_iterator_t__defined */
2267
2268#if __MigKernelSpecificCode
2269#if UseStaticTemplates
2270 const static mach_msg_port_descriptor_t iteratorTemplate = {
2271 /* name = */ MACH_PORT_NULL,
2272 /* pad1 = */ 0,
2273 /* pad2 = */ 0,
2274 /* disp = */ 17,
2275 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2276 };
2277#endif /* UseStaticTemplates */
2278
2279#else
2280#if UseStaticTemplates
2281 const static mach_msg_port_descriptor_t iteratorTemplate = {
2282 /* name = */ MACH_PORT_NULL,
2283 /* pad1 = */ 0,
2284 /* pad2 = */ 0,
2285 /* disp = */ 19,
2286 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2287 };
2288#endif /* UseStaticTemplates */
2289
2290#endif /* __MigKernelSpecificCode */
2291 kern_return_t RetCode;
2292 io_object_t registry_entry;
2293 io_object_t iterator;
2294
2295 __DeclareRcvRpc(2813, "io_registry_entry_get_child_iterator")
2296 __BeforeRcvRpc(2813, "io_registry_entry_get_child_iterator")
2297
2298#if defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined)
2299 check_result = __MIG_check__Request__io_registry_entry_get_child_iterator_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2300 if (check_result != MACH_MSG_SUCCESS)
2301 { MIG_RETURN_ERROR(OutKP, check_result); }
2302#endif /* defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined) */
2303
2304#if UseStaticTemplates
2305 OutKP->iterator = iteratorTemplate;
2306#else /* UseStaticTemplates */
2307#if __MigKernelSpecificCode
2308 OutKP->iterator.disposition = 17;
2309#else
2310 OutKP->iterator.disposition = 19;
2311#endif /* __MigKernelSpecificCode */
2312#if !(defined(KERNEL) && defined(__LP64__))
2313 OutKP->iterator.pad1 = 0;
2314#endif
2315 OutKP->iterator.pad2 = 0;
2316 OutKP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
2317#if defined(KERNEL)
2318 OutKP->iterator.pad_end = 0;
2319#endif
2320#endif /* UseStaticTemplates */
2321
2322
2323 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
2324
2325 RetCode = is_io_registry_entry_get_child_iterator(registry_entry, plane: In0UP->plane, iterator: &iterator);
2326 iokit_remove_reference(obj: registry_entry);
2327 if (RetCode != KERN_SUCCESS) {
2328 MIG_RETURN_ERROR(OutKP, RetCode);
2329 }
2330#if __MigKernelSpecificCode
2331#endif /* __MigKernelSpecificCode */
2332 OutKP->iterator.name = (mach_port_t)iokit_make_object_port(obj: iterator);
2333
2334
2335 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2336 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2337 OutKP->msgh_body.msgh_descriptor_count = 1;
2338 __AfterRcvRpc(2813, "io_registry_entry_get_child_iterator")
2339}
2340
2341#if ( __MigTypeCheck )
2342#if __MIG_check__Request__iokit_subsystem__
2343#if !defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined)
2344#define __MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined
2345
2346mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_parent_iterator_t(
2347 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_parent_iterator_t *InKP,
2348 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_parent_iterator_t *In0UP,
2349 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2350{
2351
2352 typedef __Request__io_registry_entry_get_parent_iterator_t __Request;
2353 typedef __RequestUData__io_registry_entry_get_parent_iterator_t __RequestU __attribute__((unused));
2354#if __MigTypeCheck
2355 unsigned int msgh_size;
2356#endif /* __MigTypeCheck */
2357
2358#if __MigTypeCheck
2359 msgh_size = InKP->Head.msgh_size;
2360 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2361 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
2362 return MIG_BAD_ARGUMENTS;
2363#endif /* __MigTypeCheck */
2364
2365#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_parent_iterator_t__planeCnt__defined)
2366 if (In0UP->NDR.int_rep != NDR_record.int_rep)
2367 __NDR_convert__int_rep__Request__io_registry_entry_get_parent_iterator_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
2368#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_parent_iterator_t__planeCnt__defined */
2369#if __MigTypeCheck
2370 if (In0UP->planeCnt > 128)
2371 return MIG_BAD_ARGUMENTS;
2372 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
2373 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
2374 return MIG_BAD_ARGUMENTS;
2375#endif /* __MigTypeCheck */
2376
2377#if __MigTypeCheck
2378 {
2379 char * msg_limit = (char *) InTrailerP;
2380#if __MigKernelSpecificCode
2381 size_t strnlen_limit;
2382#else
2383 size_t memchr_limit;
2384#endif /* __MigKernelSpecificCode */
2385
2386#if __MigKernelSpecificCode
2387 strnlen_limit = min((msg_limit - In0UP->plane), 128);
2388 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
2389 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
2390#else
2391 memchr_limit = min((msg_limit - In0UP->plane), 128);
2392 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
2393 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
2394#endif /* __MigKernelSpecificCode */
2395 }
2396#endif /* __MigTypeCheck */
2397
2398 return MACH_MSG_SUCCESS;
2399}
2400#endif /* !defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined) */
2401#endif /* __MIG_check__Request__iokit_subsystem__ */
2402#endif /* ( __MigTypeCheck ) */
2403
2404
2405/* Routine io_registry_entry_get_parent_iterator */
2406mig_internal novalue _Xio_registry_entry_get_parent_iterator
2407 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2408 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2409 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2410{
2411
2412#ifdef __MigPackStructs
2413#pragma pack(push, 4)
2414#endif
2415 typedef struct {
2416 NDR_record_t NDR;
2417 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
2418 mach_msg_type_number_t planeCnt;
2419 char plane[128];
2420 mach_msg_trailer_t trailer;
2421 char padding[0]; /* Avoid generating empty UData structs */
2422 } RequestU __attribute__((unused));
2423#ifdef __MigPackStructs
2424#pragma pack(pop)
2425#endif
2426 typedef __RequestKData__io_registry_entry_get_parent_iterator_t RequestK;
2427 typedef __RequestUData__io_registry_entry_get_parent_iterator_t __RequestU;
2428 typedef __ReplyKData__io_registry_entry_get_parent_iterator_t ReplyK __attribute__((unused));
2429 typedef __ReplyUData__io_registry_entry_get_parent_iterator_t ReplyU __attribute__((unused));
2430 typedef __Reply__io_registry_entry_get_parent_iterator_t Reply __attribute__((unused));
2431 typedef __Request__io_registry_entry_get_parent_iterator_t __Request __attribute__((unused));
2432
2433 /*
2434 * typedef struct {
2435 * mach_msg_header_t Head;
2436 * NDR_record_t NDR;
2437 * kern_return_t RetCode;
2438 * } mig_reply_error_t;
2439 */
2440
2441 RequestK *InKP = (RequestK *) InHeadP;
2442 RequestU *In0UP = (RequestU *) InDataP;
2443 ReplyK *OutKP = (ReplyK *) OutHeadP;
2444 ReplyU *OutUP = (ReplyU *) OutDataP;
2445 (void)OutUP;
2446#ifdef __MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined
2447 kern_return_t check_result;
2448#endif /* __MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined */
2449
2450#if __MigKernelSpecificCode
2451#if UseStaticTemplates
2452 const static mach_msg_port_descriptor_t iteratorTemplate = {
2453 /* name = */ MACH_PORT_NULL,
2454 /* pad1 = */ 0,
2455 /* pad2 = */ 0,
2456 /* disp = */ 17,
2457 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2458 };
2459#endif /* UseStaticTemplates */
2460
2461#else
2462#if UseStaticTemplates
2463 const static mach_msg_port_descriptor_t iteratorTemplate = {
2464 /* name = */ MACH_PORT_NULL,
2465 /* pad1 = */ 0,
2466 /* pad2 = */ 0,
2467 /* disp = */ 19,
2468 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2469 };
2470#endif /* UseStaticTemplates */
2471
2472#endif /* __MigKernelSpecificCode */
2473 kern_return_t RetCode;
2474 io_object_t registry_entry;
2475 io_object_t iterator;
2476
2477 __DeclareRcvRpc(2814, "io_registry_entry_get_parent_iterator")
2478 __BeforeRcvRpc(2814, "io_registry_entry_get_parent_iterator")
2479
2480#if defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined)
2481 check_result = __MIG_check__Request__io_registry_entry_get_parent_iterator_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2482 if (check_result != MACH_MSG_SUCCESS)
2483 { MIG_RETURN_ERROR(OutKP, check_result); }
2484#endif /* defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined) */
2485
2486#if UseStaticTemplates
2487 OutKP->iterator = iteratorTemplate;
2488#else /* UseStaticTemplates */
2489#if __MigKernelSpecificCode
2490 OutKP->iterator.disposition = 17;
2491#else
2492 OutKP->iterator.disposition = 19;
2493#endif /* __MigKernelSpecificCode */
2494#if !(defined(KERNEL) && defined(__LP64__))
2495 OutKP->iterator.pad1 = 0;
2496#endif
2497 OutKP->iterator.pad2 = 0;
2498 OutKP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
2499#if defined(KERNEL)
2500 OutKP->iterator.pad_end = 0;
2501#endif
2502#endif /* UseStaticTemplates */
2503
2504
2505 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
2506
2507 RetCode = is_io_registry_entry_get_parent_iterator(registry_entry, plane: In0UP->plane, iterator: &iterator);
2508 iokit_remove_reference(obj: registry_entry);
2509 if (RetCode != KERN_SUCCESS) {
2510 MIG_RETURN_ERROR(OutKP, RetCode);
2511 }
2512#if __MigKernelSpecificCode
2513#endif /* __MigKernelSpecificCode */
2514 OutKP->iterator.name = (mach_port_t)iokit_make_object_port(obj: iterator);
2515
2516
2517 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2518 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2519 OutKP->msgh_body.msgh_descriptor_count = 1;
2520 __AfterRcvRpc(2814, "io_registry_entry_get_parent_iterator")
2521}
2522
2523#if ( __MigTypeCheck )
2524#if __MIG_check__Request__iokit_subsystem__
2525#if !defined(__MIG_check__Request__io_service_close_t__defined)
2526#define __MIG_check__Request__io_service_close_t__defined
2527
2528mig_internal kern_return_t __MIG_check__Request__io_service_close_t(
2529 __attribute__((__unused__)) __RequestKData__io_service_close_t *InKP,
2530 __attribute__((__unused__)) __RequestUData__io_service_close_t *In0UP,
2531 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2532{
2533
2534 typedef __Request__io_service_close_t __Request;
2535 typedef __RequestUData__io_service_close_t __RequestU __attribute__((unused));
2536#if __MigTypeCheck
2537 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2538 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2539 return MIG_BAD_ARGUMENTS;
2540#endif /* __MigTypeCheck */
2541
2542 return MACH_MSG_SUCCESS;
2543}
2544#endif /* !defined(__MIG_check__Request__io_service_close_t__defined) */
2545#endif /* __MIG_check__Request__iokit_subsystem__ */
2546#endif /* ( __MigTypeCheck ) */
2547
2548
2549/* Routine io_service_close */
2550mig_internal novalue _Xio_service_close
2551 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2552 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2553 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2554{
2555
2556#ifdef __MigPackStructs
2557#pragma pack(push, 4)
2558#endif
2559 typedef struct {
2560 mach_msg_trailer_t trailer;
2561 char padding[0]; /* Avoid generating empty UData structs */
2562 } RequestU __attribute__((unused));
2563#ifdef __MigPackStructs
2564#pragma pack(pop)
2565#endif
2566 typedef __RequestKData__io_service_close_t RequestK;
2567 typedef __RequestUData__io_service_close_t __RequestU;
2568 typedef __ReplyKData__io_service_close_t ReplyK __attribute__((unused));
2569 typedef __ReplyUData__io_service_close_t ReplyU __attribute__((unused));
2570 typedef __Reply__io_service_close_t Reply __attribute__((unused));
2571 typedef __Request__io_service_close_t __Request __attribute__((unused));
2572
2573 /*
2574 * typedef struct {
2575 * mach_msg_header_t Head;
2576 * NDR_record_t NDR;
2577 * kern_return_t RetCode;
2578 * } mig_reply_error_t;
2579 */
2580
2581 RequestK *InKP = (RequestK *) InHeadP;
2582 RequestU *In0UP = (RequestU *) InDataP;
2583 ReplyK *OutKP = (ReplyK *) OutHeadP;
2584 ReplyU *OutUP = (ReplyU *) OutDataP;
2585 (void)OutUP;
2586#ifdef __MIG_check__Request__io_service_close_t__defined
2587 kern_return_t check_result;
2588#endif /* __MIG_check__Request__io_service_close_t__defined */
2589
2590#if __MigKernelSpecificCode
2591#else
2592#endif /* __MigKernelSpecificCode */
2593 io_connect_t connection;
2594
2595 __DeclareRcvRpc(2816, "io_service_close")
2596 __BeforeRcvRpc(2816, "io_service_close")
2597
2598#if defined(__MIG_check__Request__io_service_close_t__defined)
2599 check_result = __MIG_check__Request__io_service_close_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2600 if (check_result != MACH_MSG_SUCCESS)
2601 { MIG_RETURN_ERROR(OutKP, check_result); }
2602#endif /* defined(__MIG_check__Request__io_service_close_t__defined) */
2603
2604 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
2605
2606 OutUP->RetCode = is_io_service_close(connection);
2607 iokit_remove_connect_reference(obj: connection);
2608#if __MigKernelSpecificCode
2609#endif /* __MigKernelSpecificCode */
2610
2611 OutUP->NDR = NDR_record;
2612
2613
2614 __AfterRcvRpc(2816, "io_service_close")
2615}
2616
2617#if ( __MigTypeCheck )
2618#if __MIG_check__Request__iokit_subsystem__
2619#if !defined(__MIG_check__Request__io_connect_get_service_t__defined)
2620#define __MIG_check__Request__io_connect_get_service_t__defined
2621
2622mig_internal kern_return_t __MIG_check__Request__io_connect_get_service_t(
2623 __attribute__((__unused__)) __RequestKData__io_connect_get_service_t *InKP,
2624 __attribute__((__unused__)) __RequestUData__io_connect_get_service_t *In0UP,
2625 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2626{
2627
2628 typedef __Request__io_connect_get_service_t __Request;
2629 typedef __RequestUData__io_connect_get_service_t __RequestU __attribute__((unused));
2630#if __MigTypeCheck
2631 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2632 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2633 return MIG_BAD_ARGUMENTS;
2634#endif /* __MigTypeCheck */
2635
2636 return MACH_MSG_SUCCESS;
2637}
2638#endif /* !defined(__MIG_check__Request__io_connect_get_service_t__defined) */
2639#endif /* __MIG_check__Request__iokit_subsystem__ */
2640#endif /* ( __MigTypeCheck ) */
2641
2642
2643/* Routine io_connect_get_service */
2644mig_internal novalue _Xio_connect_get_service
2645 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2646 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2647 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2648{
2649
2650#ifdef __MigPackStructs
2651#pragma pack(push, 4)
2652#endif
2653 typedef struct {
2654 mach_msg_trailer_t trailer;
2655 char padding[0]; /* Avoid generating empty UData structs */
2656 } RequestU __attribute__((unused));
2657#ifdef __MigPackStructs
2658#pragma pack(pop)
2659#endif
2660 typedef __RequestKData__io_connect_get_service_t RequestK;
2661 typedef __RequestUData__io_connect_get_service_t __RequestU;
2662 typedef __ReplyKData__io_connect_get_service_t ReplyK __attribute__((unused));
2663 typedef __ReplyUData__io_connect_get_service_t ReplyU __attribute__((unused));
2664 typedef __Reply__io_connect_get_service_t Reply __attribute__((unused));
2665 typedef __Request__io_connect_get_service_t __Request __attribute__((unused));
2666
2667 /*
2668 * typedef struct {
2669 * mach_msg_header_t Head;
2670 * NDR_record_t NDR;
2671 * kern_return_t RetCode;
2672 * } mig_reply_error_t;
2673 */
2674
2675 RequestK *InKP = (RequestK *) InHeadP;
2676 RequestU *In0UP = (RequestU *) InDataP;
2677 ReplyK *OutKP = (ReplyK *) OutHeadP;
2678 ReplyU *OutUP = (ReplyU *) OutDataP;
2679 (void)OutUP;
2680#ifdef __MIG_check__Request__io_connect_get_service_t__defined
2681 kern_return_t check_result;
2682#endif /* __MIG_check__Request__io_connect_get_service_t__defined */
2683
2684#if __MigKernelSpecificCode
2685#if UseStaticTemplates
2686 const static mach_msg_port_descriptor_t serviceTemplate = {
2687 /* name = */ MACH_PORT_NULL,
2688 /* pad1 = */ 0,
2689 /* pad2 = */ 0,
2690 /* disp = */ 17,
2691 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2692 };
2693#endif /* UseStaticTemplates */
2694
2695#else
2696#if UseStaticTemplates
2697 const static mach_msg_port_descriptor_t serviceTemplate = {
2698 /* name = */ MACH_PORT_NULL,
2699 /* pad1 = */ 0,
2700 /* pad2 = */ 0,
2701 /* disp = */ 19,
2702 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
2703 };
2704#endif /* UseStaticTemplates */
2705
2706#endif /* __MigKernelSpecificCode */
2707 kern_return_t RetCode;
2708 io_connect_t connection;
2709 io_object_t service;
2710
2711 __DeclareRcvRpc(2817, "io_connect_get_service")
2712 __BeforeRcvRpc(2817, "io_connect_get_service")
2713
2714#if defined(__MIG_check__Request__io_connect_get_service_t__defined)
2715 check_result = __MIG_check__Request__io_connect_get_service_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2716 if (check_result != MACH_MSG_SUCCESS)
2717 { MIG_RETURN_ERROR(OutKP, check_result); }
2718#endif /* defined(__MIG_check__Request__io_connect_get_service_t__defined) */
2719
2720#if UseStaticTemplates
2721 OutKP->service = serviceTemplate;
2722#else /* UseStaticTemplates */
2723#if __MigKernelSpecificCode
2724 OutKP->service.disposition = 17;
2725#else
2726 OutKP->service.disposition = 19;
2727#endif /* __MigKernelSpecificCode */
2728#if !(defined(KERNEL) && defined(__LP64__))
2729 OutKP->service.pad1 = 0;
2730#endif
2731 OutKP->service.pad2 = 0;
2732 OutKP->service.type = MACH_MSG_PORT_DESCRIPTOR;
2733#if defined(KERNEL)
2734 OutKP->service.pad_end = 0;
2735#endif
2736#endif /* UseStaticTemplates */
2737
2738
2739 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
2740
2741 RetCode = is_io_connect_get_service(connection, service: &service);
2742 iokit_remove_connect_reference(obj: connection);
2743 if (RetCode != KERN_SUCCESS) {
2744 MIG_RETURN_ERROR(OutKP, RetCode);
2745 }
2746#if __MigKernelSpecificCode
2747#endif /* __MigKernelSpecificCode */
2748 OutKP->service.name = (mach_port_t)iokit_make_object_port(obj: service);
2749
2750
2751 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
2752 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2753 OutKP->msgh_body.msgh_descriptor_count = 1;
2754 __AfterRcvRpc(2817, "io_connect_get_service")
2755}
2756
2757#if ( __MigTypeCheck )
2758#if __MIG_check__Request__iokit_subsystem__
2759#if !defined(__MIG_check__Request__io_connect_set_notification_port_t__defined)
2760#define __MIG_check__Request__io_connect_set_notification_port_t__defined
2761
2762mig_internal kern_return_t __MIG_check__Request__io_connect_set_notification_port_t(
2763 __attribute__((__unused__)) __RequestKData__io_connect_set_notification_port_t *InKP,
2764 __attribute__((__unused__)) __RequestUData__io_connect_set_notification_port_t *In0UP,
2765 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2766{
2767
2768 typedef __Request__io_connect_set_notification_port_t __Request;
2769 typedef __RequestUData__io_connect_set_notification_port_t __RequestU __attribute__((unused));
2770#if __MigTypeCheck
2771 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2772 (InKP->msgh_body.msgh_descriptor_count != 1) ||
2773 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2774 return MIG_BAD_ARGUMENTS;
2775#endif /* __MigTypeCheck */
2776
2777#if __MigTypeCheck
2778 if (InKP->port.type != MACH_MSG_PORT_DESCRIPTOR ||
2779 InKP->port.disposition != 17)
2780 return MIG_TYPE_ERROR;
2781#endif /* __MigTypeCheck */
2782
2783 return MACH_MSG_SUCCESS;
2784}
2785#endif /* !defined(__MIG_check__Request__io_connect_set_notification_port_t__defined) */
2786#endif /* __MIG_check__Request__iokit_subsystem__ */
2787#endif /* ( __MigTypeCheck ) */
2788
2789
2790/* Routine io_connect_set_notification_port */
2791mig_internal novalue _Xio_connect_set_notification_port
2792 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2793 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2794 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2795{
2796
2797#ifdef __MigPackStructs
2798#pragma pack(push, 4)
2799#endif
2800 typedef struct {
2801 NDR_record_t NDR;
2802 uint32_t notification_type;
2803 uint32_t reference;
2804 mach_msg_trailer_t trailer;
2805 char padding[0]; /* Avoid generating empty UData structs */
2806 } RequestU __attribute__((unused));
2807#ifdef __MigPackStructs
2808#pragma pack(pop)
2809#endif
2810 typedef __RequestKData__io_connect_set_notification_port_t RequestK;
2811 typedef __RequestUData__io_connect_set_notification_port_t __RequestU;
2812 typedef __ReplyKData__io_connect_set_notification_port_t ReplyK __attribute__((unused));
2813 typedef __ReplyUData__io_connect_set_notification_port_t ReplyU __attribute__((unused));
2814 typedef __Reply__io_connect_set_notification_port_t Reply __attribute__((unused));
2815 typedef __Request__io_connect_set_notification_port_t __Request __attribute__((unused));
2816
2817 /*
2818 * typedef struct {
2819 * mach_msg_header_t Head;
2820 * NDR_record_t NDR;
2821 * kern_return_t RetCode;
2822 * } mig_reply_error_t;
2823 */
2824
2825 RequestK *InKP = (RequestK *) InHeadP;
2826 RequestU *In0UP = (RequestU *) InDataP;
2827 ReplyK *OutKP = (ReplyK *) OutHeadP;
2828 ReplyU *OutUP = (ReplyU *) OutDataP;
2829 (void)OutUP;
2830#ifdef __MIG_check__Request__io_connect_set_notification_port_t__defined
2831 kern_return_t check_result;
2832#endif /* __MIG_check__Request__io_connect_set_notification_port_t__defined */
2833
2834#if __MigKernelSpecificCode
2835#else
2836#endif /* __MigKernelSpecificCode */
2837 io_connect_t connection;
2838
2839 __DeclareRcvRpc(2818, "io_connect_set_notification_port")
2840 __BeforeRcvRpc(2818, "io_connect_set_notification_port")
2841
2842#if defined(__MIG_check__Request__io_connect_set_notification_port_t__defined)
2843 check_result = __MIG_check__Request__io_connect_set_notification_port_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2844 if (check_result != MACH_MSG_SUCCESS)
2845 { MIG_RETURN_ERROR(OutKP, check_result); }
2846#endif /* defined(__MIG_check__Request__io_connect_set_notification_port_t__defined) */
2847
2848 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
2849
2850 OutUP->RetCode = is_io_connect_set_notification_port(connection, notification_type: In0UP->notification_type, port: InKP->port.name, reference: In0UP->reference);
2851 iokit_remove_connect_reference(obj: connection);
2852#if __MigKernelSpecificCode
2853#endif /* __MigKernelSpecificCode */
2854
2855 OutUP->NDR = NDR_record;
2856
2857
2858 __AfterRcvRpc(2818, "io_connect_set_notification_port")
2859}
2860
2861#if ( __MigTypeCheck )
2862#if __MIG_check__Request__iokit_subsystem__
2863#if !defined(__MIG_check__Request__io_connect_map_memory_t__defined)
2864#define __MIG_check__Request__io_connect_map_memory_t__defined
2865
2866mig_internal kern_return_t __MIG_check__Request__io_connect_map_memory_t(
2867 __attribute__((__unused__)) __RequestKData__io_connect_map_memory_t *InKP,
2868 __attribute__((__unused__)) __RequestUData__io_connect_map_memory_t *In0UP,
2869 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2870{
2871
2872 typedef __Request__io_connect_map_memory_t __Request;
2873 typedef __RequestUData__io_connect_map_memory_t __RequestU __attribute__((unused));
2874#if __MigTypeCheck
2875 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2876 (InKP->msgh_body.msgh_descriptor_count != 1) ||
2877 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2878 return MIG_BAD_ARGUMENTS;
2879#endif /* __MigTypeCheck */
2880
2881#if __MigTypeCheck
2882 if (InKP->into_task.type != MACH_MSG_PORT_DESCRIPTOR ||
2883 InKP->into_task.disposition != 17)
2884 return MIG_TYPE_ERROR;
2885#endif /* __MigTypeCheck */
2886
2887 return MACH_MSG_SUCCESS;
2888}
2889#endif /* !defined(__MIG_check__Request__io_connect_map_memory_t__defined) */
2890#endif /* __MIG_check__Request__iokit_subsystem__ */
2891#endif /* ( __MigTypeCheck ) */
2892
2893
2894/* Routine io_connect_map_memory */
2895mig_internal novalue _Xio_connect_map_memory
2896 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
2897 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
2898 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
2899{
2900
2901#ifdef __MigPackStructs
2902#pragma pack(push, 4)
2903#endif
2904 typedef struct {
2905 NDR_record_t NDR;
2906 uint32_t memory_type;
2907 uint32_t address;
2908 uint32_t size;
2909 uint32_t flags;
2910 mach_msg_trailer_t trailer;
2911 char padding[0]; /* Avoid generating empty UData structs */
2912 } RequestU __attribute__((unused));
2913#ifdef __MigPackStructs
2914#pragma pack(pop)
2915#endif
2916 typedef __RequestKData__io_connect_map_memory_t RequestK;
2917 typedef __RequestUData__io_connect_map_memory_t __RequestU;
2918 typedef __ReplyKData__io_connect_map_memory_t ReplyK __attribute__((unused));
2919 typedef __ReplyUData__io_connect_map_memory_t ReplyU __attribute__((unused));
2920 typedef __Reply__io_connect_map_memory_t Reply __attribute__((unused));
2921 typedef __Request__io_connect_map_memory_t __Request __attribute__((unused));
2922
2923 /*
2924 * typedef struct {
2925 * mach_msg_header_t Head;
2926 * NDR_record_t NDR;
2927 * kern_return_t RetCode;
2928 * } mig_reply_error_t;
2929 */
2930
2931 RequestK *InKP = (RequestK *) InHeadP;
2932 RequestU *In0UP = (RequestU *) InDataP;
2933 ReplyK *OutKP = (ReplyK *) OutHeadP;
2934 ReplyU *OutUP = (ReplyU *) OutDataP;
2935 (void)OutUP;
2936#ifdef __MIG_check__Request__io_connect_map_memory_t__defined
2937 kern_return_t check_result;
2938#endif /* __MIG_check__Request__io_connect_map_memory_t__defined */
2939
2940#if __MigKernelSpecificCode
2941#else
2942#endif /* __MigKernelSpecificCode */
2943 io_connect_t connection;
2944 task_t into_task;
2945
2946 __DeclareRcvRpc(2819, "io_connect_map_memory")
2947 __BeforeRcvRpc(2819, "io_connect_map_memory")
2948
2949#if defined(__MIG_check__Request__io_connect_map_memory_t__defined)
2950 check_result = __MIG_check__Request__io_connect_map_memory_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
2951 if (check_result != MACH_MSG_SUCCESS)
2952 { MIG_RETURN_ERROR(OutKP, check_result); }
2953#endif /* defined(__MIG_check__Request__io_connect_map_memory_t__defined) */
2954
2955 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
2956
2957 into_task = convert_port_to_task_mig(port: InKP->into_task.name);
2958
2959 OutUP->RetCode = is_io_connect_map_memory(connection, memory_type: In0UP->memory_type, into_task, address: &In0UP->address, size: &In0UP->size, flags: In0UP->flags);
2960 task_deallocate_mig(into_task);
2961 iokit_remove_connect_reference(obj: connection);
2962 if (OutUP->RetCode != KERN_SUCCESS) {
2963 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
2964 }
2965#if __MigKernelSpecificCode
2966 ipc_port_release_send(port: (ipc_port_t)InKP->into_task.name);
2967#endif /* __MigKernelSpecificCode */
2968
2969 OutUP->NDR = NDR_record;
2970
2971
2972 OutUP->address = In0UP->address;
2973
2974 OutUP->size = In0UP->size;
2975
2976 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
2977 __AfterRcvRpc(2819, "io_connect_map_memory")
2978}
2979
2980#if ( __MigTypeCheck )
2981#if __MIG_check__Request__iokit_subsystem__
2982#if !defined(__MIG_check__Request__io_connect_add_client_t__defined)
2983#define __MIG_check__Request__io_connect_add_client_t__defined
2984
2985mig_internal kern_return_t __MIG_check__Request__io_connect_add_client_t(
2986 __attribute__((__unused__)) __RequestKData__io_connect_add_client_t *InKP,
2987 __attribute__((__unused__)) __RequestUData__io_connect_add_client_t *In0UP,
2988 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
2989{
2990
2991 typedef __Request__io_connect_add_client_t __Request;
2992 typedef __RequestUData__io_connect_add_client_t __RequestU __attribute__((unused));
2993#if __MigTypeCheck
2994 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
2995 (InKP->msgh_body.msgh_descriptor_count != 1) ||
2996 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
2997 return MIG_BAD_ARGUMENTS;
2998#endif /* __MigTypeCheck */
2999
3000#if __MigTypeCheck
3001 if (InKP->connect_to.type != MACH_MSG_PORT_DESCRIPTOR ||
3002 InKP->connect_to.disposition != 17)
3003 return MIG_TYPE_ERROR;
3004#endif /* __MigTypeCheck */
3005
3006 return MACH_MSG_SUCCESS;
3007}
3008#endif /* !defined(__MIG_check__Request__io_connect_add_client_t__defined) */
3009#endif /* __MIG_check__Request__iokit_subsystem__ */
3010#endif /* ( __MigTypeCheck ) */
3011
3012
3013/* Routine io_connect_add_client */
3014mig_internal novalue _Xio_connect_add_client
3015 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3016 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3017 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3018{
3019
3020#ifdef __MigPackStructs
3021#pragma pack(push, 4)
3022#endif
3023 typedef struct {
3024 mach_msg_trailer_t trailer;
3025 char padding[0]; /* Avoid generating empty UData structs */
3026 } RequestU __attribute__((unused));
3027#ifdef __MigPackStructs
3028#pragma pack(pop)
3029#endif
3030 typedef __RequestKData__io_connect_add_client_t RequestK;
3031 typedef __RequestUData__io_connect_add_client_t __RequestU;
3032 typedef __ReplyKData__io_connect_add_client_t ReplyK __attribute__((unused));
3033 typedef __ReplyUData__io_connect_add_client_t ReplyU __attribute__((unused));
3034 typedef __Reply__io_connect_add_client_t Reply __attribute__((unused));
3035 typedef __Request__io_connect_add_client_t __Request __attribute__((unused));
3036
3037 /*
3038 * typedef struct {
3039 * mach_msg_header_t Head;
3040 * NDR_record_t NDR;
3041 * kern_return_t RetCode;
3042 * } mig_reply_error_t;
3043 */
3044
3045 RequestK *InKP = (RequestK *) InHeadP;
3046 RequestU *In0UP = (RequestU *) InDataP;
3047 ReplyK *OutKP = (ReplyK *) OutHeadP;
3048 ReplyU *OutUP = (ReplyU *) OutDataP;
3049 (void)OutUP;
3050#ifdef __MIG_check__Request__io_connect_add_client_t__defined
3051 kern_return_t check_result;
3052#endif /* __MIG_check__Request__io_connect_add_client_t__defined */
3053
3054#if __MigKernelSpecificCode
3055#else
3056#endif /* __MigKernelSpecificCode */
3057 io_connect_t connection;
3058 io_connect_t connect_to;
3059
3060 __DeclareRcvRpc(2820, "io_connect_add_client")
3061 __BeforeRcvRpc(2820, "io_connect_add_client")
3062
3063#if defined(__MIG_check__Request__io_connect_add_client_t__defined)
3064 check_result = __MIG_check__Request__io_connect_add_client_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3065 if (check_result != MACH_MSG_SUCCESS)
3066 { MIG_RETURN_ERROR(OutKP, check_result); }
3067#endif /* defined(__MIG_check__Request__io_connect_add_client_t__defined) */
3068
3069 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
3070
3071 connect_to = iokit_lookup_connect_port(port: InKP->connect_to.name);
3072
3073 OutUP->RetCode = is_io_connect_add_client(connection, connect_to);
3074 iokit_remove_connect_reference(obj: connect_to);
3075 iokit_remove_connect_reference(obj: connection);
3076#if __MigKernelSpecificCode
3077 if (OutUP->RetCode != KERN_SUCCESS) {
3078 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3079 }
3080 ipc_port_release_send(port: (ipc_port_t)InKP->connect_to.name);
3081#endif /* __MigKernelSpecificCode */
3082
3083 OutUP->NDR = NDR_record;
3084
3085
3086 __AfterRcvRpc(2820, "io_connect_add_client")
3087}
3088
3089#if ( __MigTypeCheck )
3090#if __MIG_check__Request__iokit_subsystem__
3091#if !defined(__MIG_check__Request__io_connect_set_properties_t__defined)
3092#define __MIG_check__Request__io_connect_set_properties_t__defined
3093
3094mig_internal kern_return_t __MIG_check__Request__io_connect_set_properties_t(
3095 __attribute__((__unused__)) __RequestKData__io_connect_set_properties_t *InKP,
3096 __attribute__((__unused__)) __RequestUData__io_connect_set_properties_t *In0UP,
3097 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3098{
3099
3100 typedef __Request__io_connect_set_properties_t __Request;
3101 typedef __RequestUData__io_connect_set_properties_t __RequestU __attribute__((unused));
3102#if __MigTypeCheck
3103 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3104 (InKP->msgh_body.msgh_descriptor_count != 1) ||
3105 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3106 return MIG_BAD_ARGUMENTS;
3107#endif /* __MigTypeCheck */
3108
3109#if __MigTypeCheck
3110 if (InKP->properties.type != MACH_MSG_OOL_DESCRIPTOR)
3111 return MIG_TYPE_ERROR;
3112#endif /* __MigTypeCheck */
3113
3114#if __MigTypeCheck
3115 if (InKP->properties.size != In0UP->propertiesCnt)
3116 return MIG_TYPE_ERROR;
3117#endif /* __MigTypeCheck */
3118
3119 return MACH_MSG_SUCCESS;
3120}
3121#endif /* !defined(__MIG_check__Request__io_connect_set_properties_t__defined) */
3122#endif /* __MIG_check__Request__iokit_subsystem__ */
3123#endif /* ( __MigTypeCheck ) */
3124
3125
3126/* Routine io_connect_set_properties */
3127mig_internal novalue _Xio_connect_set_properties
3128 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3129 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3130 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3131{
3132
3133#ifdef __MigPackStructs
3134#pragma pack(push, 4)
3135#endif
3136 typedef struct {
3137 NDR_record_t NDR;
3138 mach_msg_type_number_t propertiesCnt;
3139 mach_msg_trailer_t trailer;
3140 char padding[0]; /* Avoid generating empty UData structs */
3141 } RequestU __attribute__((unused));
3142#ifdef __MigPackStructs
3143#pragma pack(pop)
3144#endif
3145 typedef __RequestKData__io_connect_set_properties_t RequestK;
3146 typedef __RequestUData__io_connect_set_properties_t __RequestU;
3147 typedef __ReplyKData__io_connect_set_properties_t ReplyK __attribute__((unused));
3148 typedef __ReplyUData__io_connect_set_properties_t ReplyU __attribute__((unused));
3149 typedef __Reply__io_connect_set_properties_t Reply __attribute__((unused));
3150 typedef __Request__io_connect_set_properties_t __Request __attribute__((unused));
3151
3152 /*
3153 * typedef struct {
3154 * mach_msg_header_t Head;
3155 * NDR_record_t NDR;
3156 * kern_return_t RetCode;
3157 * } mig_reply_error_t;
3158 */
3159
3160 RequestK *InKP = (RequestK *) InHeadP;
3161 RequestU *In0UP = (RequestU *) InDataP;
3162 ReplyK *OutKP = (ReplyK *) OutHeadP;
3163 ReplyU *OutUP = (ReplyU *) OutDataP;
3164 (void)OutUP;
3165#ifdef __MIG_check__Request__io_connect_set_properties_t__defined
3166 kern_return_t check_result;
3167#endif /* __MIG_check__Request__io_connect_set_properties_t__defined */
3168
3169#if __MigKernelSpecificCode
3170#else
3171#endif /* __MigKernelSpecificCode */
3172 io_connect_t connection;
3173
3174 __DeclareRcvRpc(2821, "io_connect_set_properties")
3175 __BeforeRcvRpc(2821, "io_connect_set_properties")
3176
3177#if defined(__MIG_check__Request__io_connect_set_properties_t__defined)
3178 check_result = __MIG_check__Request__io_connect_set_properties_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3179 if (check_result != MACH_MSG_SUCCESS)
3180 { MIG_RETURN_ERROR(OutKP, check_result); }
3181#endif /* defined(__MIG_check__Request__io_connect_set_properties_t__defined) */
3182
3183 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
3184
3185 OutUP->RetCode = is_io_connect_set_properties(connection, properties: (io_buf_ptr_t)(InKP->properties.address), propertiesCnt: InKP->properties.size, result: &OutUP->result);
3186 iokit_remove_connect_reference(obj: connection);
3187 if (OutUP->RetCode != KERN_SUCCESS) {
3188 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3189 }
3190#if __MigKernelSpecificCode
3191#endif /* __MigKernelSpecificCode */
3192
3193 OutUP->NDR = NDR_record;
3194
3195
3196 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
3197 __AfterRcvRpc(2821, "io_connect_set_properties")
3198}
3199
3200#if ( __MigTypeCheck )
3201#if __MIG_check__Request__iokit_subsystem__
3202#if !defined(__MIG_check__Request__io_connect_method_scalarI_scalarO_t__defined)
3203#define __MIG_check__Request__io_connect_method_scalarI_scalarO_t__defined
3204
3205mig_internal kern_return_t __MIG_check__Request__io_connect_method_scalarI_scalarO_t(
3206 __attribute__((__unused__)) __RequestKData__io_connect_method_scalarI_scalarO_t *InKP,
3207 __attribute__((__unused__)) __RequestUData__io_connect_method_scalarI_scalarO_t *In0UP,
3208 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3209 __attribute__((__unused__)) __RequestUData__io_connect_method_scalarI_scalarO_t **In1UPP)
3210{
3211
3212 typedef __Request__io_connect_method_scalarI_scalarO_t __Request;
3213 typedef __RequestUData__io_connect_method_scalarI_scalarO_t __RequestU __attribute__((unused));
3214 __RequestU *In1UP;
3215#if __MigTypeCheck
3216 unsigned int msgh_size;
3217#endif /* __MigTypeCheck */
3218 unsigned int msgh_size_delta;
3219
3220#if __MigTypeCheck
3221 msgh_size = InKP->Head.msgh_size;
3222 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3223 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 64)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
3224 return MIG_BAD_ARGUMENTS;
3225#endif /* __MigTypeCheck */
3226
3227#if defined(__NDR_convert__int_rep__Request__io_connect_method_scalarI_scalarO_t__inputCnt__defined)
3228 if (In0UP->NDR.int_rep != NDR_record.int_rep)
3229 __NDR_convert__int_rep__Request__io_connect_method_scalarI_scalarO_t__inputCnt(&In0UP->inputCnt, In0UP->NDR.int_rep);
3230#endif /* __NDR_convert__int_rep__Request__io_connect_method_scalarI_scalarO_t__inputCnt__defined */
3231 msgh_size_delta = (4 * In0UP->inputCnt);
3232#if __MigTypeCheck
3233 if (In0UP->inputCnt > 16)
3234 return MIG_BAD_ARGUMENTS;
3235 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 64)) / 4 < In0UP->inputCnt) ||
3236 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 64) + (4 * In0UP->inputCnt)))
3237 return MIG_BAD_ARGUMENTS;
3238#endif /* __MigTypeCheck */
3239
3240 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 64);
3241
3242 return MACH_MSG_SUCCESS;
3243}
3244#endif /* !defined(__MIG_check__Request__io_connect_method_scalarI_scalarO_t__defined) */
3245#endif /* __MIG_check__Request__iokit_subsystem__ */
3246#endif /* ( __MigTypeCheck ) */
3247
3248
3249/* Routine io_connect_method_scalarI_scalarO */
3250mig_internal novalue _Xio_connect_method_scalarI_scalarO
3251 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3252 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3253 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3254{
3255
3256#ifdef __MigPackStructs
3257#pragma pack(push, 4)
3258#endif
3259 typedef struct {
3260 NDR_record_t NDR;
3261 uint32_t selector;
3262 mach_msg_type_number_t inputCnt;
3263 int input[16];
3264 mach_msg_type_number_t outputCnt;
3265 mach_msg_trailer_t trailer;
3266 char padding[0]; /* Avoid generating empty UData structs */
3267 } RequestU __attribute__((unused));
3268#ifdef __MigPackStructs
3269#pragma pack(pop)
3270#endif
3271 typedef __RequestKData__io_connect_method_scalarI_scalarO_t RequestK;
3272 typedef __RequestUData__io_connect_method_scalarI_scalarO_t __RequestU;
3273 typedef __ReplyKData__io_connect_method_scalarI_scalarO_t ReplyK __attribute__((unused));
3274 typedef __ReplyUData__io_connect_method_scalarI_scalarO_t ReplyU __attribute__((unused));
3275 typedef __Reply__io_connect_method_scalarI_scalarO_t Reply __attribute__((unused));
3276 typedef __Request__io_connect_method_scalarI_scalarO_t __Request __attribute__((unused));
3277
3278 /*
3279 * typedef struct {
3280 * mach_msg_header_t Head;
3281 * NDR_record_t NDR;
3282 * kern_return_t RetCode;
3283 * } mig_reply_error_t;
3284 */
3285
3286 RequestK *InKP = (RequestK *) InHeadP;
3287 RequestU *In0UP = (RequestU *) InDataP;
3288 RequestU *In1UP;
3289 ReplyK *OutKP = (ReplyK *) OutHeadP;
3290 ReplyU *OutUP = (ReplyU *) OutDataP;
3291 (void)OutUP;
3292#ifdef __MIG_check__Request__io_connect_method_scalarI_scalarO_t__defined
3293 kern_return_t check_result;
3294#endif /* __MIG_check__Request__io_connect_method_scalarI_scalarO_t__defined */
3295
3296#if __MigKernelSpecificCode
3297#else
3298#endif /* __MigKernelSpecificCode */
3299 io_connect_t connection;
3300
3301 __DeclareRcvRpc(2822, "io_connect_method_scalarI_scalarO")
3302 __BeforeRcvRpc(2822, "io_connect_method_scalarI_scalarO")
3303
3304#if defined(__MIG_check__Request__io_connect_method_scalarI_scalarO_t__defined)
3305 check_result = __MIG_check__Request__io_connect_method_scalarI_scalarO_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
3306 if (check_result != MACH_MSG_SUCCESS)
3307 { MIG_RETURN_ERROR(OutKP, check_result); }
3308#endif /* defined(__MIG_check__Request__io_connect_method_scalarI_scalarO_t__defined) */
3309
3310 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
3311
3312 OutUP->outputCnt = 16;
3313 if (In1UP->outputCnt < OutUP->outputCnt)
3314 OutUP->outputCnt = In1UP->outputCnt;
3315
3316 OutUP->RetCode = is_io_connect_method_scalarI_scalarO(connection, selector: In0UP->selector, input: In0UP->input, inputCnt: In0UP->inputCnt, output: OutUP->output, outputCnt: &OutUP->outputCnt);
3317 iokit_remove_connect_reference(obj: connection);
3318 if (OutUP->RetCode != KERN_SUCCESS) {
3319 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3320 }
3321#if __MigKernelSpecificCode
3322#endif /* __MigKernelSpecificCode */
3323
3324 OutUP->NDR = NDR_record;
3325
3326 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 64) + (((4 * OutUP->outputCnt)));
3327
3328 __AfterRcvRpc(2822, "io_connect_method_scalarI_scalarO")
3329}
3330
3331#if ( __MigTypeCheck )
3332#if __MIG_check__Request__iokit_subsystem__
3333#if !defined(__MIG_check__Request__io_connect_method_scalarI_structureO_t__defined)
3334#define __MIG_check__Request__io_connect_method_scalarI_structureO_t__defined
3335
3336mig_internal kern_return_t __MIG_check__Request__io_connect_method_scalarI_structureO_t(
3337 __attribute__((__unused__)) __RequestKData__io_connect_method_scalarI_structureO_t *InKP,
3338 __attribute__((__unused__)) __RequestUData__io_connect_method_scalarI_structureO_t *In0UP,
3339 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3340 __attribute__((__unused__)) __RequestUData__io_connect_method_scalarI_structureO_t **In1UPP)
3341{
3342
3343 typedef __Request__io_connect_method_scalarI_structureO_t __Request;
3344 typedef __RequestUData__io_connect_method_scalarI_structureO_t __RequestU __attribute__((unused));
3345 __RequestU *In1UP;
3346#if __MigTypeCheck
3347 unsigned int msgh_size;
3348#endif /* __MigTypeCheck */
3349 unsigned int msgh_size_delta;
3350
3351#if __MigTypeCheck
3352 msgh_size = InKP->Head.msgh_size;
3353 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3354 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 64)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
3355 return MIG_BAD_ARGUMENTS;
3356#endif /* __MigTypeCheck */
3357
3358#if defined(__NDR_convert__int_rep__Request__io_connect_method_scalarI_structureO_t__inputCnt__defined)
3359 if (In0UP->NDR.int_rep != NDR_record.int_rep)
3360 __NDR_convert__int_rep__Request__io_connect_method_scalarI_structureO_t__inputCnt(&In0UP->inputCnt, In0UP->NDR.int_rep);
3361#endif /* __NDR_convert__int_rep__Request__io_connect_method_scalarI_structureO_t__inputCnt__defined */
3362 msgh_size_delta = (4 * In0UP->inputCnt);
3363#if __MigTypeCheck
3364 if (In0UP->inputCnt > 16)
3365 return MIG_BAD_ARGUMENTS;
3366 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 64)) / 4 < In0UP->inputCnt) ||
3367 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 64) + (4 * In0UP->inputCnt)))
3368 return MIG_BAD_ARGUMENTS;
3369#endif /* __MigTypeCheck */
3370
3371 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 64);
3372
3373 return MACH_MSG_SUCCESS;
3374}
3375#endif /* !defined(__MIG_check__Request__io_connect_method_scalarI_structureO_t__defined) */
3376#endif /* __MIG_check__Request__iokit_subsystem__ */
3377#endif /* ( __MigTypeCheck ) */
3378
3379
3380/* Routine io_connect_method_scalarI_structureO */
3381mig_internal novalue _Xio_connect_method_scalarI_structureO
3382 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3383 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3384 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3385{
3386
3387#ifdef __MigPackStructs
3388#pragma pack(push, 4)
3389#endif
3390 typedef struct {
3391 NDR_record_t NDR;
3392 uint32_t selector;
3393 mach_msg_type_number_t inputCnt;
3394 int input[16];
3395 mach_msg_type_number_t outputCnt;
3396 mach_msg_trailer_t trailer;
3397 char padding[0]; /* Avoid generating empty UData structs */
3398 } RequestU __attribute__((unused));
3399#ifdef __MigPackStructs
3400#pragma pack(pop)
3401#endif
3402 typedef __RequestKData__io_connect_method_scalarI_structureO_t RequestK;
3403 typedef __RequestUData__io_connect_method_scalarI_structureO_t __RequestU;
3404 typedef __ReplyKData__io_connect_method_scalarI_structureO_t ReplyK __attribute__((unused));
3405 typedef __ReplyUData__io_connect_method_scalarI_structureO_t ReplyU __attribute__((unused));
3406 typedef __Reply__io_connect_method_scalarI_structureO_t Reply __attribute__((unused));
3407 typedef __Request__io_connect_method_scalarI_structureO_t __Request __attribute__((unused));
3408
3409 /*
3410 * typedef struct {
3411 * mach_msg_header_t Head;
3412 * NDR_record_t NDR;
3413 * kern_return_t RetCode;
3414 * } mig_reply_error_t;
3415 */
3416
3417 RequestK *InKP = (RequestK *) InHeadP;
3418 RequestU *In0UP = (RequestU *) InDataP;
3419 RequestU *In1UP;
3420 ReplyK *OutKP = (ReplyK *) OutHeadP;
3421 ReplyU *OutUP = (ReplyU *) OutDataP;
3422 (void)OutUP;
3423#ifdef __MIG_check__Request__io_connect_method_scalarI_structureO_t__defined
3424 kern_return_t check_result;
3425#endif /* __MIG_check__Request__io_connect_method_scalarI_structureO_t__defined */
3426
3427#if __MigKernelSpecificCode
3428#else
3429#endif /* __MigKernelSpecificCode */
3430 io_connect_t connection;
3431
3432 __DeclareRcvRpc(2823, "io_connect_method_scalarI_structureO")
3433 __BeforeRcvRpc(2823, "io_connect_method_scalarI_structureO")
3434
3435#if defined(__MIG_check__Request__io_connect_method_scalarI_structureO_t__defined)
3436 check_result = __MIG_check__Request__io_connect_method_scalarI_structureO_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
3437 if (check_result != MACH_MSG_SUCCESS)
3438 { MIG_RETURN_ERROR(OutKP, check_result); }
3439#endif /* defined(__MIG_check__Request__io_connect_method_scalarI_structureO_t__defined) */
3440
3441 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
3442
3443 OutUP->outputCnt = 4096;
3444 if (In1UP->outputCnt < OutUP->outputCnt)
3445 OutUP->outputCnt = In1UP->outputCnt;
3446
3447 OutUP->RetCode = is_io_connect_method_scalarI_structureO(connection, selector: In0UP->selector, input: In0UP->input, inputCnt: In0UP->inputCnt, output: OutUP->output, outputCnt: &OutUP->outputCnt);
3448 iokit_remove_connect_reference(obj: connection);
3449 if (OutUP->RetCode != KERN_SUCCESS) {
3450 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3451 }
3452#if __MigKernelSpecificCode
3453#endif /* __MigKernelSpecificCode */
3454
3455 OutUP->NDR = NDR_record;
3456
3457 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + (_WALIGN_((OutUP->outputCnt + 3) & ~3));
3458
3459 __AfterRcvRpc(2823, "io_connect_method_scalarI_structureO")
3460}
3461
3462#if ( __MigTypeCheck )
3463#if __MIG_check__Request__iokit_subsystem__
3464#if !defined(__MIG_check__Request__io_connect_method_scalarI_structureI_t__defined)
3465#define __MIG_check__Request__io_connect_method_scalarI_structureI_t__defined
3466
3467mig_internal kern_return_t __MIG_check__Request__io_connect_method_scalarI_structureI_t(
3468 __attribute__((__unused__)) __RequestKData__io_connect_method_scalarI_structureI_t *InKP,
3469 __attribute__((__unused__)) __RequestUData__io_connect_method_scalarI_structureI_t *In0UP,
3470 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3471 __attribute__((__unused__)) __RequestUData__io_connect_method_scalarI_structureI_t **In1UPP)
3472{
3473
3474 typedef __Request__io_connect_method_scalarI_structureI_t __Request;
3475 typedef __RequestUData__io_connect_method_scalarI_structureI_t __RequestU __attribute__((unused));
3476 __RequestU *In1UP;
3477#if __MigTypeCheck
3478 unsigned int msgh_size;
3479#endif /* __MigTypeCheck */
3480 unsigned int msgh_size_delta;
3481
3482#if __MigTypeCheck
3483 msgh_size = InKP->Head.msgh_size;
3484 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3485 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4160)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
3486 return MIG_BAD_ARGUMENTS;
3487#endif /* __MigTypeCheck */
3488
3489#if defined(__NDR_convert__int_rep__Request__io_connect_method_scalarI_structureI_t__inputCnt__defined)
3490 if (In0UP->NDR.int_rep != NDR_record.int_rep)
3491 __NDR_convert__int_rep__Request__io_connect_method_scalarI_structureI_t__inputCnt(&In0UP->inputCnt, In0UP->NDR.int_rep);
3492#endif /* __NDR_convert__int_rep__Request__io_connect_method_scalarI_structureI_t__inputCnt__defined */
3493 msgh_size_delta = (4 * In0UP->inputCnt);
3494#if __MigTypeCheck
3495 if (In0UP->inputCnt > 16)
3496 return MIG_BAD_ARGUMENTS;
3497 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4160)) / 4 < In0UP->inputCnt) ||
3498 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4160) + (4 * In0UP->inputCnt)))
3499 return MIG_BAD_ARGUMENTS;
3500 msgh_size -= msgh_size_delta;
3501#endif /* __MigTypeCheck */
3502
3503 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 64);
3504
3505#if defined(__NDR_convert__int_rep__Request__io_connect_method_scalarI_structureI_t__inputStructCnt__defined)
3506 if (In0UP->NDR.int_rep != NDR_record.int_rep)
3507 __NDR_convert__int_rep__Request__io_connect_method_scalarI_structureI_t__inputStructCnt(&In1UP->inputStructCnt, In1UP->NDR.int_rep);
3508#endif /* __NDR_convert__int_rep__Request__io_connect_method_scalarI_structureI_t__inputStructCnt__defined */
3509#if __MigTypeCheck
3510 if (In1UP->inputStructCnt > 4096)
3511 return MIG_BAD_ARGUMENTS;
3512 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4160)) < In1UP->inputStructCnt) ||
3513 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4160) + _WALIGN_(In1UP->inputStructCnt)))
3514 return MIG_BAD_ARGUMENTS;
3515#endif /* __MigTypeCheck */
3516
3517 return MACH_MSG_SUCCESS;
3518}
3519#endif /* !defined(__MIG_check__Request__io_connect_method_scalarI_structureI_t__defined) */
3520#endif /* __MIG_check__Request__iokit_subsystem__ */
3521#endif /* ( __MigTypeCheck ) */
3522
3523
3524/* Routine io_connect_method_scalarI_structureI */
3525mig_internal novalue _Xio_connect_method_scalarI_structureI
3526 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3527 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3528 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3529{
3530
3531#ifdef __MigPackStructs
3532#pragma pack(push, 4)
3533#endif
3534 typedef struct {
3535 NDR_record_t NDR;
3536 uint32_t selector;
3537 mach_msg_type_number_t inputCnt;
3538 int input[16];
3539 mach_msg_type_number_t inputStructCnt;
3540 char inputStruct[4096];
3541 mach_msg_trailer_t trailer;
3542 char padding[0]; /* Avoid generating empty UData structs */
3543 } RequestU __attribute__((unused));
3544#ifdef __MigPackStructs
3545#pragma pack(pop)
3546#endif
3547 typedef __RequestKData__io_connect_method_scalarI_structureI_t RequestK;
3548 typedef __RequestUData__io_connect_method_scalarI_structureI_t __RequestU;
3549 typedef __ReplyKData__io_connect_method_scalarI_structureI_t ReplyK __attribute__((unused));
3550 typedef __ReplyUData__io_connect_method_scalarI_structureI_t ReplyU __attribute__((unused));
3551 typedef __Reply__io_connect_method_scalarI_structureI_t Reply __attribute__((unused));
3552 typedef __Request__io_connect_method_scalarI_structureI_t __Request __attribute__((unused));
3553
3554 /*
3555 * typedef struct {
3556 * mach_msg_header_t Head;
3557 * NDR_record_t NDR;
3558 * kern_return_t RetCode;
3559 * } mig_reply_error_t;
3560 */
3561
3562 RequestK *InKP = (RequestK *) InHeadP;
3563 RequestU *In0UP = (RequestU *) InDataP;
3564 RequestU *In1UP;
3565 ReplyK *OutKP = (ReplyK *) OutHeadP;
3566 ReplyU *OutUP = (ReplyU *) OutDataP;
3567 (void)OutUP;
3568#ifdef __MIG_check__Request__io_connect_method_scalarI_structureI_t__defined
3569 kern_return_t check_result;
3570#endif /* __MIG_check__Request__io_connect_method_scalarI_structureI_t__defined */
3571
3572#if __MigKernelSpecificCode
3573#else
3574#endif /* __MigKernelSpecificCode */
3575 io_connect_t connection;
3576
3577 __DeclareRcvRpc(2824, "io_connect_method_scalarI_structureI")
3578 __BeforeRcvRpc(2824, "io_connect_method_scalarI_structureI")
3579
3580#if defined(__MIG_check__Request__io_connect_method_scalarI_structureI_t__defined)
3581 check_result = __MIG_check__Request__io_connect_method_scalarI_structureI_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
3582 if (check_result != MACH_MSG_SUCCESS)
3583 { MIG_RETURN_ERROR(OutKP, check_result); }
3584#endif /* defined(__MIG_check__Request__io_connect_method_scalarI_structureI_t__defined) */
3585
3586 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
3587
3588 OutUP->RetCode = is_io_connect_method_scalarI_structureI(connection, selector: In0UP->selector, input: In0UP->input, inputCnt: In0UP->inputCnt, inputStruct: In1UP->inputStruct, inputStructCnt: In1UP->inputStructCnt);
3589 iokit_remove_connect_reference(obj: connection);
3590#if __MigKernelSpecificCode
3591#endif /* __MigKernelSpecificCode */
3592
3593 OutUP->NDR = NDR_record;
3594
3595
3596 __AfterRcvRpc(2824, "io_connect_method_scalarI_structureI")
3597}
3598
3599#if ( __MigTypeCheck )
3600#if __MIG_check__Request__iokit_subsystem__
3601#if !defined(__MIG_check__Request__io_connect_method_structureI_structureO_t__defined)
3602#define __MIG_check__Request__io_connect_method_structureI_structureO_t__defined
3603
3604mig_internal kern_return_t __MIG_check__Request__io_connect_method_structureI_structureO_t(
3605 __attribute__((__unused__)) __RequestKData__io_connect_method_structureI_structureO_t *InKP,
3606 __attribute__((__unused__)) __RequestUData__io_connect_method_structureI_structureO_t *In0UP,
3607 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3608 __attribute__((__unused__)) __RequestUData__io_connect_method_structureI_structureO_t **In1UPP)
3609{
3610
3611 typedef __Request__io_connect_method_structureI_structureO_t __Request;
3612 typedef __RequestUData__io_connect_method_structureI_structureO_t __RequestU __attribute__((unused));
3613 __RequestU *In1UP;
3614#if __MigTypeCheck
3615 unsigned int msgh_size;
3616#endif /* __MigTypeCheck */
3617 unsigned int msgh_size_delta;
3618
3619#if __MigTypeCheck
3620 msgh_size = InKP->Head.msgh_size;
3621 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3622 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
3623 return MIG_BAD_ARGUMENTS;
3624#endif /* __MigTypeCheck */
3625
3626#if defined(__NDR_convert__int_rep__Request__io_connect_method_structureI_structureO_t__inputCnt__defined)
3627 if (In0UP->NDR.int_rep != NDR_record.int_rep)
3628 __NDR_convert__int_rep__Request__io_connect_method_structureI_structureO_t__inputCnt(&In0UP->inputCnt, In0UP->NDR.int_rep);
3629#endif /* __NDR_convert__int_rep__Request__io_connect_method_structureI_structureO_t__inputCnt__defined */
3630 msgh_size_delta = _WALIGN_(In0UP->inputCnt);
3631#if __MigTypeCheck
3632 if (In0UP->inputCnt > 4096)
3633 return MIG_BAD_ARGUMENTS;
3634 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0UP->inputCnt) ||
3635 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0UP->inputCnt)))
3636 return MIG_BAD_ARGUMENTS;
3637#endif /* __MigTypeCheck */
3638
3639 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 4096);
3640
3641 return MACH_MSG_SUCCESS;
3642}
3643#endif /* !defined(__MIG_check__Request__io_connect_method_structureI_structureO_t__defined) */
3644#endif /* __MIG_check__Request__iokit_subsystem__ */
3645#endif /* ( __MigTypeCheck ) */
3646
3647
3648/* Routine io_connect_method_structureI_structureO */
3649mig_internal novalue _Xio_connect_method_structureI_structureO
3650 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3651 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3652 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3653{
3654
3655#ifdef __MigPackStructs
3656#pragma pack(push, 4)
3657#endif
3658 typedef struct {
3659 NDR_record_t NDR;
3660 uint32_t selector;
3661 mach_msg_type_number_t inputCnt;
3662 char input[4096];
3663 mach_msg_type_number_t outputCnt;
3664 mach_msg_trailer_t trailer;
3665 char padding[0]; /* Avoid generating empty UData structs */
3666 } RequestU __attribute__((unused));
3667#ifdef __MigPackStructs
3668#pragma pack(pop)
3669#endif
3670 typedef __RequestKData__io_connect_method_structureI_structureO_t RequestK;
3671 typedef __RequestUData__io_connect_method_structureI_structureO_t __RequestU;
3672 typedef __ReplyKData__io_connect_method_structureI_structureO_t ReplyK __attribute__((unused));
3673 typedef __ReplyUData__io_connect_method_structureI_structureO_t ReplyU __attribute__((unused));
3674 typedef __Reply__io_connect_method_structureI_structureO_t Reply __attribute__((unused));
3675 typedef __Request__io_connect_method_structureI_structureO_t __Request __attribute__((unused));
3676
3677 /*
3678 * typedef struct {
3679 * mach_msg_header_t Head;
3680 * NDR_record_t NDR;
3681 * kern_return_t RetCode;
3682 * } mig_reply_error_t;
3683 */
3684
3685 RequestK *InKP = (RequestK *) InHeadP;
3686 RequestU *In0UP = (RequestU *) InDataP;
3687 RequestU *In1UP;
3688 ReplyK *OutKP = (ReplyK *) OutHeadP;
3689 ReplyU *OutUP = (ReplyU *) OutDataP;
3690 (void)OutUP;
3691#ifdef __MIG_check__Request__io_connect_method_structureI_structureO_t__defined
3692 kern_return_t check_result;
3693#endif /* __MIG_check__Request__io_connect_method_structureI_structureO_t__defined */
3694
3695#if __MigKernelSpecificCode
3696#else
3697#endif /* __MigKernelSpecificCode */
3698 io_connect_t connection;
3699
3700 __DeclareRcvRpc(2825, "io_connect_method_structureI_structureO")
3701 __BeforeRcvRpc(2825, "io_connect_method_structureI_structureO")
3702
3703#if defined(__MIG_check__Request__io_connect_method_structureI_structureO_t__defined)
3704 check_result = __MIG_check__Request__io_connect_method_structureI_structureO_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
3705 if (check_result != MACH_MSG_SUCCESS)
3706 { MIG_RETURN_ERROR(OutKP, check_result); }
3707#endif /* defined(__MIG_check__Request__io_connect_method_structureI_structureO_t__defined) */
3708
3709 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
3710
3711 OutUP->outputCnt = 4096;
3712 if (In1UP->outputCnt < OutUP->outputCnt)
3713 OutUP->outputCnt = In1UP->outputCnt;
3714
3715 OutUP->RetCode = is_io_connect_method_structureI_structureO(connection, selector: In0UP->selector, input: In0UP->input, inputCnt: In0UP->inputCnt, output: OutUP->output, outputCnt: &OutUP->outputCnt);
3716 iokit_remove_connect_reference(obj: connection);
3717 if (OutUP->RetCode != KERN_SUCCESS) {
3718 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3719 }
3720#if __MigKernelSpecificCode
3721#endif /* __MigKernelSpecificCode */
3722
3723 OutUP->NDR = NDR_record;
3724
3725 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + (_WALIGN_((OutUP->outputCnt + 3) & ~3));
3726
3727 __AfterRcvRpc(2825, "io_connect_method_structureI_structureO")
3728}
3729
3730#if ( __MigTypeCheck )
3731#if __MIG_check__Request__iokit_subsystem__
3732#if !defined(__MIG_check__Request__io_registry_entry_get_path_t__defined)
3733#define __MIG_check__Request__io_registry_entry_get_path_t__defined
3734
3735mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_path_t(
3736 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_path_t *InKP,
3737 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_path_t *In0UP,
3738 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3739{
3740
3741 typedef __Request__io_registry_entry_get_path_t __Request;
3742 typedef __RequestUData__io_registry_entry_get_path_t __RequestU __attribute__((unused));
3743#if __MigTypeCheck
3744 unsigned int msgh_size;
3745#endif /* __MigTypeCheck */
3746
3747#if __MigTypeCheck
3748 msgh_size = InKP->Head.msgh_size;
3749 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3750 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
3751 return MIG_BAD_ARGUMENTS;
3752#endif /* __MigTypeCheck */
3753
3754#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_path_t__planeCnt__defined)
3755 if (In0UP->NDR.int_rep != NDR_record.int_rep)
3756 __NDR_convert__int_rep__Request__io_registry_entry_get_path_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
3757#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_path_t__planeCnt__defined */
3758#if __MigTypeCheck
3759 if (In0UP->planeCnt > 128)
3760 return MIG_BAD_ARGUMENTS;
3761 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
3762 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
3763 return MIG_BAD_ARGUMENTS;
3764#endif /* __MigTypeCheck */
3765
3766#if __MigTypeCheck
3767 {
3768 char * msg_limit = (char *) InTrailerP;
3769#if __MigKernelSpecificCode
3770 size_t strnlen_limit;
3771#else
3772 size_t memchr_limit;
3773#endif /* __MigKernelSpecificCode */
3774
3775#if __MigKernelSpecificCode
3776 strnlen_limit = min((msg_limit - In0UP->plane), 128);
3777 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
3778 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
3779#else
3780 memchr_limit = min((msg_limit - In0UP->plane), 128);
3781 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
3782 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
3783#endif /* __MigKernelSpecificCode */
3784 }
3785#endif /* __MigTypeCheck */
3786
3787 return MACH_MSG_SUCCESS;
3788}
3789#endif /* !defined(__MIG_check__Request__io_registry_entry_get_path_t__defined) */
3790#endif /* __MIG_check__Request__iokit_subsystem__ */
3791#endif /* ( __MigTypeCheck ) */
3792
3793
3794/* Routine io_registry_entry_get_path */
3795mig_internal novalue _Xio_registry_entry_get_path
3796 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3797 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3798 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3799{
3800
3801#ifdef __MigPackStructs
3802#pragma pack(push, 4)
3803#endif
3804 typedef struct {
3805 NDR_record_t NDR;
3806 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
3807 mach_msg_type_number_t planeCnt;
3808 char plane[128];
3809 mach_msg_trailer_t trailer;
3810 char padding[0]; /* Avoid generating empty UData structs */
3811 } RequestU __attribute__((unused));
3812#ifdef __MigPackStructs
3813#pragma pack(pop)
3814#endif
3815 typedef __RequestKData__io_registry_entry_get_path_t RequestK;
3816 typedef __RequestUData__io_registry_entry_get_path_t __RequestU;
3817 typedef __ReplyKData__io_registry_entry_get_path_t ReplyK __attribute__((unused));
3818 typedef __ReplyUData__io_registry_entry_get_path_t ReplyU __attribute__((unused));
3819 typedef __Reply__io_registry_entry_get_path_t Reply __attribute__((unused));
3820 typedef __Request__io_registry_entry_get_path_t __Request __attribute__((unused));
3821
3822 /*
3823 * typedef struct {
3824 * mach_msg_header_t Head;
3825 * NDR_record_t NDR;
3826 * kern_return_t RetCode;
3827 * } mig_reply_error_t;
3828 */
3829
3830 RequestK *InKP = (RequestK *) InHeadP;
3831 RequestU *In0UP = (RequestU *) InDataP;
3832 ReplyK *OutKP = (ReplyK *) OutHeadP;
3833 ReplyU *OutUP = (ReplyU *) OutDataP;
3834 (void)OutUP;
3835#ifdef __MIG_check__Request__io_registry_entry_get_path_t__defined
3836 kern_return_t check_result;
3837#endif /* __MIG_check__Request__io_registry_entry_get_path_t__defined */
3838
3839#if __MigKernelSpecificCode
3840#else
3841#endif /* __MigKernelSpecificCode */
3842 io_object_t registry_entry;
3843
3844 __DeclareRcvRpc(2826, "io_registry_entry_get_path")
3845 __BeforeRcvRpc(2826, "io_registry_entry_get_path")
3846
3847#if defined(__MIG_check__Request__io_registry_entry_get_path_t__defined)
3848 check_result = __MIG_check__Request__io_registry_entry_get_path_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3849 if (check_result != MACH_MSG_SUCCESS)
3850 { MIG_RETURN_ERROR(OutKP, check_result); }
3851#endif /* defined(__MIG_check__Request__io_registry_entry_get_path_t__defined) */
3852
3853 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
3854
3855 OutUP->RetCode = is_io_registry_entry_get_path(registry_entry, plane: In0UP->plane, path: OutUP->path);
3856 iokit_remove_reference(obj: registry_entry);
3857 if (OutUP->RetCode != KERN_SUCCESS) {
3858 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
3859 }
3860#if __MigKernelSpecificCode
3861#endif /* __MigKernelSpecificCode */
3862
3863 OutUP->NDR = NDR_record;
3864
3865#ifdef __LP64__
3866 {
3867 size_t strLength = strlen(s: OutUP->path) + 1;
3868 if (strLength > 0xffffffff)
3869 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
3870 OutUP->pathCnt = (mach_msg_type_number_t) strLength;
3871 }
3872#else
3873 OutUP->pathCnt = (mach_msg_type_number_t) strlen(OutUP->path) + 1;
3874#endif /* __LP64__ */
3875 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 512) + (_WALIGN_((OutUP->pathCnt + 3) & ~3));
3876
3877 __AfterRcvRpc(2826, "io_registry_entry_get_path")
3878}
3879
3880#if ( __MigTypeCheck )
3881#if __MIG_check__Request__iokit_subsystem__
3882#if !defined(__MIG_check__Request__io_registry_get_root_entry_t__defined)
3883#define __MIG_check__Request__io_registry_get_root_entry_t__defined
3884
3885mig_internal kern_return_t __MIG_check__Request__io_registry_get_root_entry_t(
3886 __attribute__((__unused__)) __RequestKData__io_registry_get_root_entry_t *InKP,
3887 __attribute__((__unused__)) __RequestUData__io_registry_get_root_entry_t *In0UP,
3888 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
3889{
3890
3891 typedef __Request__io_registry_get_root_entry_t __Request;
3892 typedef __RequestUData__io_registry_get_root_entry_t __RequestU __attribute__((unused));
3893#if __MigTypeCheck
3894 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
3895 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
3896 return MIG_BAD_ARGUMENTS;
3897#endif /* __MigTypeCheck */
3898
3899 return MACH_MSG_SUCCESS;
3900}
3901#endif /* !defined(__MIG_check__Request__io_registry_get_root_entry_t__defined) */
3902#endif /* __MIG_check__Request__iokit_subsystem__ */
3903#endif /* ( __MigTypeCheck ) */
3904
3905
3906/* Routine io_registry_get_root_entry */
3907mig_internal novalue _Xio_registry_get_root_entry
3908 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
3909 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
3910 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
3911{
3912
3913#ifdef __MigPackStructs
3914#pragma pack(push, 4)
3915#endif
3916 typedef struct {
3917 mach_msg_trailer_t trailer;
3918 char padding[0]; /* Avoid generating empty UData structs */
3919 } RequestU __attribute__((unused));
3920#ifdef __MigPackStructs
3921#pragma pack(pop)
3922#endif
3923 typedef __RequestKData__io_registry_get_root_entry_t RequestK;
3924 typedef __RequestUData__io_registry_get_root_entry_t __RequestU;
3925 typedef __ReplyKData__io_registry_get_root_entry_t ReplyK __attribute__((unused));
3926 typedef __ReplyUData__io_registry_get_root_entry_t ReplyU __attribute__((unused));
3927 typedef __Reply__io_registry_get_root_entry_t Reply __attribute__((unused));
3928 typedef __Request__io_registry_get_root_entry_t __Request __attribute__((unused));
3929
3930 /*
3931 * typedef struct {
3932 * mach_msg_header_t Head;
3933 * NDR_record_t NDR;
3934 * kern_return_t RetCode;
3935 * } mig_reply_error_t;
3936 */
3937
3938 RequestK *InKP = (RequestK *) InHeadP;
3939 RequestU *In0UP = (RequestU *) InDataP;
3940 ReplyK *OutKP = (ReplyK *) OutHeadP;
3941 ReplyU *OutUP = (ReplyU *) OutDataP;
3942 (void)OutUP;
3943#ifdef __MIG_check__Request__io_registry_get_root_entry_t__defined
3944 kern_return_t check_result;
3945#endif /* __MIG_check__Request__io_registry_get_root_entry_t__defined */
3946
3947#if __MigKernelSpecificCode
3948#if UseStaticTemplates
3949 const static mach_msg_port_descriptor_t rootTemplate = {
3950 /* name = */ MACH_PORT_NULL,
3951 /* pad1 = */ 0,
3952 /* pad2 = */ 0,
3953 /* disp = */ 17,
3954 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3955 };
3956#endif /* UseStaticTemplates */
3957
3958#else
3959#if UseStaticTemplates
3960 const static mach_msg_port_descriptor_t rootTemplate = {
3961 /* name = */ MACH_PORT_NULL,
3962 /* pad1 = */ 0,
3963 /* pad2 = */ 0,
3964 /* disp = */ 19,
3965 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
3966 };
3967#endif /* UseStaticTemplates */
3968
3969#endif /* __MigKernelSpecificCode */
3970 kern_return_t RetCode;
3971 io_object_t root;
3972
3973 __DeclareRcvRpc(2827, "io_registry_get_root_entry")
3974 __BeforeRcvRpc(2827, "io_registry_get_root_entry")
3975
3976#if defined(__MIG_check__Request__io_registry_get_root_entry_t__defined)
3977 check_result = __MIG_check__Request__io_registry_get_root_entry_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
3978 if (check_result != MACH_MSG_SUCCESS)
3979 { MIG_RETURN_ERROR(OutKP, check_result); }
3980#endif /* defined(__MIG_check__Request__io_registry_get_root_entry_t__defined) */
3981
3982#if UseStaticTemplates
3983 OutKP->root = rootTemplate;
3984#else /* UseStaticTemplates */
3985#if __MigKernelSpecificCode
3986 OutKP->root.disposition = 17;
3987#else
3988 OutKP->root.disposition = 19;
3989#endif /* __MigKernelSpecificCode */
3990#if !(defined(KERNEL) && defined(__LP64__))
3991 OutKP->root.pad1 = 0;
3992#endif
3993 OutKP->root.pad2 = 0;
3994 OutKP->root.type = MACH_MSG_PORT_DESCRIPTOR;
3995#if defined(KERNEL)
3996 OutKP->root.pad_end = 0;
3997#endif
3998#endif /* UseStaticTemplates */
3999
4000
4001 RetCode = is_io_registry_get_root_entry(main_port: InKP->Head.msgh_request_port, root: &root);
4002 if (RetCode != KERN_SUCCESS) {
4003 MIG_RETURN_ERROR(OutKP, RetCode);
4004 }
4005#if __MigKernelSpecificCode
4006#endif /* __MigKernelSpecificCode */
4007 OutKP->root.name = (mach_port_t)iokit_make_object_port(obj: root);
4008
4009
4010 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
4011 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4012 OutKP->msgh_body.msgh_descriptor_count = 1;
4013 __AfterRcvRpc(2827, "io_registry_get_root_entry")
4014}
4015
4016#if ( __MigTypeCheck )
4017#if __MIG_check__Request__iokit_subsystem__
4018#if !defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined)
4019#define __MIG_check__Request__io_registry_entry_set_properties_t__defined
4020
4021mig_internal kern_return_t __MIG_check__Request__io_registry_entry_set_properties_t(
4022 __attribute__((__unused__)) __RequestKData__io_registry_entry_set_properties_t *InKP,
4023 __attribute__((__unused__)) __RequestUData__io_registry_entry_set_properties_t *In0UP,
4024 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4025{
4026
4027 typedef __Request__io_registry_entry_set_properties_t __Request;
4028 typedef __RequestUData__io_registry_entry_set_properties_t __RequestU __attribute__((unused));
4029#if __MigTypeCheck
4030 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4031 (InKP->msgh_body.msgh_descriptor_count != 1) ||
4032 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4033 return MIG_BAD_ARGUMENTS;
4034#endif /* __MigTypeCheck */
4035
4036#if __MigTypeCheck
4037 if (InKP->properties.type != MACH_MSG_OOL_DESCRIPTOR)
4038 return MIG_TYPE_ERROR;
4039#endif /* __MigTypeCheck */
4040
4041#if __MigTypeCheck
4042 if (InKP->properties.size != In0UP->propertiesCnt)
4043 return MIG_TYPE_ERROR;
4044#endif /* __MigTypeCheck */
4045
4046 return MACH_MSG_SUCCESS;
4047}
4048#endif /* !defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined) */
4049#endif /* __MIG_check__Request__iokit_subsystem__ */
4050#endif /* ( __MigTypeCheck ) */
4051
4052
4053/* Routine io_registry_entry_set_properties */
4054mig_internal novalue _Xio_registry_entry_set_properties
4055 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4056 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4057 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4058{
4059
4060#ifdef __MigPackStructs
4061#pragma pack(push, 4)
4062#endif
4063 typedef struct {
4064 NDR_record_t NDR;
4065 mach_msg_type_number_t propertiesCnt;
4066 mach_msg_trailer_t trailer;
4067 char padding[0]; /* Avoid generating empty UData structs */
4068 } RequestU __attribute__((unused));
4069#ifdef __MigPackStructs
4070#pragma pack(pop)
4071#endif
4072 typedef __RequestKData__io_registry_entry_set_properties_t RequestK;
4073 typedef __RequestUData__io_registry_entry_set_properties_t __RequestU;
4074 typedef __ReplyKData__io_registry_entry_set_properties_t ReplyK __attribute__((unused));
4075 typedef __ReplyUData__io_registry_entry_set_properties_t ReplyU __attribute__((unused));
4076 typedef __Reply__io_registry_entry_set_properties_t Reply __attribute__((unused));
4077 typedef __Request__io_registry_entry_set_properties_t __Request __attribute__((unused));
4078
4079 /*
4080 * typedef struct {
4081 * mach_msg_header_t Head;
4082 * NDR_record_t NDR;
4083 * kern_return_t RetCode;
4084 * } mig_reply_error_t;
4085 */
4086
4087 RequestK *InKP = (RequestK *) InHeadP;
4088 RequestU *In0UP = (RequestU *) InDataP;
4089 ReplyK *OutKP = (ReplyK *) OutHeadP;
4090 ReplyU *OutUP = (ReplyU *) OutDataP;
4091 (void)OutUP;
4092#ifdef __MIG_check__Request__io_registry_entry_set_properties_t__defined
4093 kern_return_t check_result;
4094#endif /* __MIG_check__Request__io_registry_entry_set_properties_t__defined */
4095
4096#if __MigKernelSpecificCode
4097#else
4098#endif /* __MigKernelSpecificCode */
4099 io_object_t registry_entry;
4100
4101 __DeclareRcvRpc(2828, "io_registry_entry_set_properties")
4102 __BeforeRcvRpc(2828, "io_registry_entry_set_properties")
4103
4104#if defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined)
4105 check_result = __MIG_check__Request__io_registry_entry_set_properties_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4106 if (check_result != MACH_MSG_SUCCESS)
4107 { MIG_RETURN_ERROR(OutKP, check_result); }
4108#endif /* defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined) */
4109
4110 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
4111
4112 OutUP->RetCode = is_io_registry_entry_set_properties(registry_entry, properties: (io_buf_ptr_t)(InKP->properties.address), propertiesCnt: InKP->properties.size, result: &OutUP->result);
4113 iokit_remove_reference(obj: registry_entry);
4114 if (OutUP->RetCode != KERN_SUCCESS) {
4115 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4116 }
4117#if __MigKernelSpecificCode
4118#endif /* __MigKernelSpecificCode */
4119
4120 OutUP->NDR = NDR_record;
4121
4122
4123 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4124 __AfterRcvRpc(2828, "io_registry_entry_set_properties")
4125}
4126
4127#if ( __MigTypeCheck )
4128#if __MIG_check__Request__iokit_subsystem__
4129#if !defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined)
4130#define __MIG_check__Request__io_registry_entry_in_plane_t__defined
4131
4132mig_internal kern_return_t __MIG_check__Request__io_registry_entry_in_plane_t(
4133 __attribute__((__unused__)) __RequestKData__io_registry_entry_in_plane_t *InKP,
4134 __attribute__((__unused__)) __RequestUData__io_registry_entry_in_plane_t *In0UP,
4135 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4136{
4137
4138 typedef __Request__io_registry_entry_in_plane_t __Request;
4139 typedef __RequestUData__io_registry_entry_in_plane_t __RequestU __attribute__((unused));
4140#if __MigTypeCheck
4141 unsigned int msgh_size;
4142#endif /* __MigTypeCheck */
4143
4144#if __MigTypeCheck
4145 msgh_size = InKP->Head.msgh_size;
4146 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4147 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
4148 return MIG_BAD_ARGUMENTS;
4149#endif /* __MigTypeCheck */
4150
4151#if defined(__NDR_convert__int_rep__Request__io_registry_entry_in_plane_t__planeCnt__defined)
4152 if (In0UP->NDR.int_rep != NDR_record.int_rep)
4153 __NDR_convert__int_rep__Request__io_registry_entry_in_plane_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
4154#endif /* __NDR_convert__int_rep__Request__io_registry_entry_in_plane_t__planeCnt__defined */
4155#if __MigTypeCheck
4156 if (In0UP->planeCnt > 128)
4157 return MIG_BAD_ARGUMENTS;
4158 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
4159 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
4160 return MIG_BAD_ARGUMENTS;
4161#endif /* __MigTypeCheck */
4162
4163#if __MigTypeCheck
4164 {
4165 char * msg_limit = (char *) InTrailerP;
4166#if __MigKernelSpecificCode
4167 size_t strnlen_limit;
4168#else
4169 size_t memchr_limit;
4170#endif /* __MigKernelSpecificCode */
4171
4172#if __MigKernelSpecificCode
4173 strnlen_limit = min((msg_limit - In0UP->plane), 128);
4174 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
4175 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
4176#else
4177 memchr_limit = min((msg_limit - In0UP->plane), 128);
4178 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
4179 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
4180#endif /* __MigKernelSpecificCode */
4181 }
4182#endif /* __MigTypeCheck */
4183
4184 return MACH_MSG_SUCCESS;
4185}
4186#endif /* !defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined) */
4187#endif /* __MIG_check__Request__iokit_subsystem__ */
4188#endif /* ( __MigTypeCheck ) */
4189
4190
4191/* Routine io_registry_entry_in_plane */
4192mig_internal novalue _Xio_registry_entry_in_plane
4193 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4194 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4195 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4196{
4197
4198#ifdef __MigPackStructs
4199#pragma pack(push, 4)
4200#endif
4201 typedef struct {
4202 NDR_record_t NDR;
4203 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
4204 mach_msg_type_number_t planeCnt;
4205 char plane[128];
4206 mach_msg_trailer_t trailer;
4207 char padding[0]; /* Avoid generating empty UData structs */
4208 } RequestU __attribute__((unused));
4209#ifdef __MigPackStructs
4210#pragma pack(pop)
4211#endif
4212 typedef __RequestKData__io_registry_entry_in_plane_t RequestK;
4213 typedef __RequestUData__io_registry_entry_in_plane_t __RequestU;
4214 typedef __ReplyKData__io_registry_entry_in_plane_t ReplyK __attribute__((unused));
4215 typedef __ReplyUData__io_registry_entry_in_plane_t ReplyU __attribute__((unused));
4216 typedef __Reply__io_registry_entry_in_plane_t Reply __attribute__((unused));
4217 typedef __Request__io_registry_entry_in_plane_t __Request __attribute__((unused));
4218
4219 /*
4220 * typedef struct {
4221 * mach_msg_header_t Head;
4222 * NDR_record_t NDR;
4223 * kern_return_t RetCode;
4224 * } mig_reply_error_t;
4225 */
4226
4227 RequestK *InKP = (RequestK *) InHeadP;
4228 RequestU *In0UP = (RequestU *) InDataP;
4229 ReplyK *OutKP = (ReplyK *) OutHeadP;
4230 ReplyU *OutUP = (ReplyU *) OutDataP;
4231 (void)OutUP;
4232#ifdef __MIG_check__Request__io_registry_entry_in_plane_t__defined
4233 kern_return_t check_result;
4234#endif /* __MIG_check__Request__io_registry_entry_in_plane_t__defined */
4235
4236#if __MigKernelSpecificCode
4237#else
4238#endif /* __MigKernelSpecificCode */
4239 io_object_t registry_entry;
4240
4241 __DeclareRcvRpc(2829, "io_registry_entry_in_plane")
4242 __BeforeRcvRpc(2829, "io_registry_entry_in_plane")
4243
4244#if defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined)
4245 check_result = __MIG_check__Request__io_registry_entry_in_plane_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4246 if (check_result != MACH_MSG_SUCCESS)
4247 { MIG_RETURN_ERROR(OutKP, check_result); }
4248#endif /* defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined) */
4249
4250 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
4251
4252 OutUP->RetCode = is_io_registry_entry_in_plane(registry_entry, plane: In0UP->plane, inPlane: &OutUP->inPlane);
4253 iokit_remove_reference(obj: registry_entry);
4254 if (OutUP->RetCode != KERN_SUCCESS) {
4255 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4256 }
4257#if __MigKernelSpecificCode
4258#endif /* __MigKernelSpecificCode */
4259
4260 OutUP->NDR = NDR_record;
4261
4262
4263 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4264 __AfterRcvRpc(2829, "io_registry_entry_in_plane")
4265}
4266
4267#if ( __MigTypeCheck )
4268#if __MIG_check__Request__iokit_subsystem__
4269#if !defined(__MIG_check__Request__io_object_get_retain_count_t__defined)
4270#define __MIG_check__Request__io_object_get_retain_count_t__defined
4271
4272mig_internal kern_return_t __MIG_check__Request__io_object_get_retain_count_t(
4273 __attribute__((__unused__)) __RequestKData__io_object_get_retain_count_t *InKP,
4274 __attribute__((__unused__)) __RequestUData__io_object_get_retain_count_t *In0UP,
4275 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4276{
4277
4278 typedef __Request__io_object_get_retain_count_t __Request;
4279 typedef __RequestUData__io_object_get_retain_count_t __RequestU __attribute__((unused));
4280#if __MigTypeCheck
4281 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4282 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4283 return MIG_BAD_ARGUMENTS;
4284#endif /* __MigTypeCheck */
4285
4286 return MACH_MSG_SUCCESS;
4287}
4288#endif /* !defined(__MIG_check__Request__io_object_get_retain_count_t__defined) */
4289#endif /* __MIG_check__Request__iokit_subsystem__ */
4290#endif /* ( __MigTypeCheck ) */
4291
4292
4293/* Routine io_object_get_retain_count */
4294mig_internal novalue _Xio_object_get_retain_count
4295 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4296 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4297 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4298{
4299
4300#ifdef __MigPackStructs
4301#pragma pack(push, 4)
4302#endif
4303 typedef struct {
4304 mach_msg_trailer_t trailer;
4305 char padding[0]; /* Avoid generating empty UData structs */
4306 } RequestU __attribute__((unused));
4307#ifdef __MigPackStructs
4308#pragma pack(pop)
4309#endif
4310 typedef __RequestKData__io_object_get_retain_count_t RequestK;
4311 typedef __RequestUData__io_object_get_retain_count_t __RequestU;
4312 typedef __ReplyKData__io_object_get_retain_count_t ReplyK __attribute__((unused));
4313 typedef __ReplyUData__io_object_get_retain_count_t ReplyU __attribute__((unused));
4314 typedef __Reply__io_object_get_retain_count_t Reply __attribute__((unused));
4315 typedef __Request__io_object_get_retain_count_t __Request __attribute__((unused));
4316
4317 /*
4318 * typedef struct {
4319 * mach_msg_header_t Head;
4320 * NDR_record_t NDR;
4321 * kern_return_t RetCode;
4322 * } mig_reply_error_t;
4323 */
4324
4325 RequestK *InKP = (RequestK *) InHeadP;
4326 RequestU *In0UP = (RequestU *) InDataP;
4327 ReplyK *OutKP = (ReplyK *) OutHeadP;
4328 ReplyU *OutUP = (ReplyU *) OutDataP;
4329 (void)OutUP;
4330#ifdef __MIG_check__Request__io_object_get_retain_count_t__defined
4331 kern_return_t check_result;
4332#endif /* __MIG_check__Request__io_object_get_retain_count_t__defined */
4333
4334#if __MigKernelSpecificCode
4335#else
4336#endif /* __MigKernelSpecificCode */
4337 io_object_t object;
4338
4339 __DeclareRcvRpc(2830, "io_object_get_retain_count")
4340 __BeforeRcvRpc(2830, "io_object_get_retain_count")
4341
4342#if defined(__MIG_check__Request__io_object_get_retain_count_t__defined)
4343 check_result = __MIG_check__Request__io_object_get_retain_count_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4344 if (check_result != MACH_MSG_SUCCESS)
4345 { MIG_RETURN_ERROR(OutKP, check_result); }
4346#endif /* defined(__MIG_check__Request__io_object_get_retain_count_t__defined) */
4347
4348 object = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
4349
4350 OutUP->RetCode = is_io_object_get_retain_count(object, retainCount: &OutUP->retainCount);
4351 iokit_remove_reference(obj: object);
4352 if (OutUP->RetCode != KERN_SUCCESS) {
4353 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4354 }
4355#if __MigKernelSpecificCode
4356#endif /* __MigKernelSpecificCode */
4357
4358 OutUP->NDR = NDR_record;
4359
4360
4361 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4362 __AfterRcvRpc(2830, "io_object_get_retain_count")
4363}
4364
4365#if ( __MigTypeCheck )
4366#if __MIG_check__Request__iokit_subsystem__
4367#if !defined(__MIG_check__Request__io_service_get_busy_state_t__defined)
4368#define __MIG_check__Request__io_service_get_busy_state_t__defined
4369
4370mig_internal kern_return_t __MIG_check__Request__io_service_get_busy_state_t(
4371 __attribute__((__unused__)) __RequestKData__io_service_get_busy_state_t *InKP,
4372 __attribute__((__unused__)) __RequestUData__io_service_get_busy_state_t *In0UP,
4373 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4374{
4375
4376 typedef __Request__io_service_get_busy_state_t __Request;
4377 typedef __RequestUData__io_service_get_busy_state_t __RequestU __attribute__((unused));
4378#if __MigTypeCheck
4379 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4380 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4381 return MIG_BAD_ARGUMENTS;
4382#endif /* __MigTypeCheck */
4383
4384 return MACH_MSG_SUCCESS;
4385}
4386#endif /* !defined(__MIG_check__Request__io_service_get_busy_state_t__defined) */
4387#endif /* __MIG_check__Request__iokit_subsystem__ */
4388#endif /* ( __MigTypeCheck ) */
4389
4390
4391/* Routine io_service_get_busy_state */
4392mig_internal novalue _Xio_service_get_busy_state
4393 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4394 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4395 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4396{
4397
4398#ifdef __MigPackStructs
4399#pragma pack(push, 4)
4400#endif
4401 typedef struct {
4402 mach_msg_trailer_t trailer;
4403 char padding[0]; /* Avoid generating empty UData structs */
4404 } RequestU __attribute__((unused));
4405#ifdef __MigPackStructs
4406#pragma pack(pop)
4407#endif
4408 typedef __RequestKData__io_service_get_busy_state_t RequestK;
4409 typedef __RequestUData__io_service_get_busy_state_t __RequestU;
4410 typedef __ReplyKData__io_service_get_busy_state_t ReplyK __attribute__((unused));
4411 typedef __ReplyUData__io_service_get_busy_state_t ReplyU __attribute__((unused));
4412 typedef __Reply__io_service_get_busy_state_t Reply __attribute__((unused));
4413 typedef __Request__io_service_get_busy_state_t __Request __attribute__((unused));
4414
4415 /*
4416 * typedef struct {
4417 * mach_msg_header_t Head;
4418 * NDR_record_t NDR;
4419 * kern_return_t RetCode;
4420 * } mig_reply_error_t;
4421 */
4422
4423 RequestK *InKP = (RequestK *) InHeadP;
4424 RequestU *In0UP = (RequestU *) InDataP;
4425 ReplyK *OutKP = (ReplyK *) OutHeadP;
4426 ReplyU *OutUP = (ReplyU *) OutDataP;
4427 (void)OutUP;
4428#ifdef __MIG_check__Request__io_service_get_busy_state_t__defined
4429 kern_return_t check_result;
4430#endif /* __MIG_check__Request__io_service_get_busy_state_t__defined */
4431
4432#if __MigKernelSpecificCode
4433#else
4434#endif /* __MigKernelSpecificCode */
4435 io_object_t service;
4436
4437 __DeclareRcvRpc(2831, "io_service_get_busy_state")
4438 __BeforeRcvRpc(2831, "io_service_get_busy_state")
4439
4440#if defined(__MIG_check__Request__io_service_get_busy_state_t__defined)
4441 check_result = __MIG_check__Request__io_service_get_busy_state_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4442 if (check_result != MACH_MSG_SUCCESS)
4443 { MIG_RETURN_ERROR(OutKP, check_result); }
4444#endif /* defined(__MIG_check__Request__io_service_get_busy_state_t__defined) */
4445
4446 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
4447
4448 OutUP->RetCode = is_io_service_get_busy_state(service, busyState: &OutUP->busyState);
4449 iokit_remove_reference(obj: service);
4450 if (OutUP->RetCode != KERN_SUCCESS) {
4451 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4452 }
4453#if __MigKernelSpecificCode
4454#endif /* __MigKernelSpecificCode */
4455
4456 OutUP->NDR = NDR_record;
4457
4458
4459 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4460 __AfterRcvRpc(2831, "io_service_get_busy_state")
4461}
4462
4463#if ( __MigTypeCheck )
4464#if __MIG_check__Request__iokit_subsystem__
4465#if !defined(__MIG_check__Request__io_service_wait_quiet_t__defined)
4466#define __MIG_check__Request__io_service_wait_quiet_t__defined
4467
4468mig_internal kern_return_t __MIG_check__Request__io_service_wait_quiet_t(
4469 __attribute__((__unused__)) __RequestKData__io_service_wait_quiet_t *InKP,
4470 __attribute__((__unused__)) __RequestUData__io_service_wait_quiet_t *In0UP,
4471 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4472{
4473
4474 typedef __Request__io_service_wait_quiet_t __Request;
4475 typedef __RequestUData__io_service_wait_quiet_t __RequestU __attribute__((unused));
4476#if __MigTypeCheck
4477 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4478 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4479 return MIG_BAD_ARGUMENTS;
4480#endif /* __MigTypeCheck */
4481
4482 return MACH_MSG_SUCCESS;
4483}
4484#endif /* !defined(__MIG_check__Request__io_service_wait_quiet_t__defined) */
4485#endif /* __MIG_check__Request__iokit_subsystem__ */
4486#endif /* ( __MigTypeCheck ) */
4487
4488
4489/* Routine io_service_wait_quiet */
4490mig_internal novalue _Xio_service_wait_quiet
4491 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4492 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4493 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4494{
4495
4496#ifdef __MigPackStructs
4497#pragma pack(push, 4)
4498#endif
4499 typedef struct {
4500 NDR_record_t NDR;
4501 mach_timespec_t wait_time;
4502 mach_msg_trailer_t trailer;
4503 char padding[0]; /* Avoid generating empty UData structs */
4504 } RequestU __attribute__((unused));
4505#ifdef __MigPackStructs
4506#pragma pack(pop)
4507#endif
4508 typedef __RequestKData__io_service_wait_quiet_t RequestK;
4509 typedef __RequestUData__io_service_wait_quiet_t __RequestU;
4510 typedef __ReplyKData__io_service_wait_quiet_t ReplyK __attribute__((unused));
4511 typedef __ReplyUData__io_service_wait_quiet_t ReplyU __attribute__((unused));
4512 typedef __Reply__io_service_wait_quiet_t Reply __attribute__((unused));
4513 typedef __Request__io_service_wait_quiet_t __Request __attribute__((unused));
4514
4515 /*
4516 * typedef struct {
4517 * mach_msg_header_t Head;
4518 * NDR_record_t NDR;
4519 * kern_return_t RetCode;
4520 * } mig_reply_error_t;
4521 */
4522
4523 RequestK *InKP = (RequestK *) InHeadP;
4524 RequestU *In0UP = (RequestU *) InDataP;
4525 ReplyK *OutKP = (ReplyK *) OutHeadP;
4526 ReplyU *OutUP = (ReplyU *) OutDataP;
4527 (void)OutUP;
4528#ifdef __MIG_check__Request__io_service_wait_quiet_t__defined
4529 kern_return_t check_result;
4530#endif /* __MIG_check__Request__io_service_wait_quiet_t__defined */
4531
4532#if __MigKernelSpecificCode
4533#else
4534#endif /* __MigKernelSpecificCode */
4535 io_object_t service;
4536
4537 __DeclareRcvRpc(2832, "io_service_wait_quiet")
4538 __BeforeRcvRpc(2832, "io_service_wait_quiet")
4539
4540#if defined(__MIG_check__Request__io_service_wait_quiet_t__defined)
4541 check_result = __MIG_check__Request__io_service_wait_quiet_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4542 if (check_result != MACH_MSG_SUCCESS)
4543 { MIG_RETURN_ERROR(OutKP, check_result); }
4544#endif /* defined(__MIG_check__Request__io_service_wait_quiet_t__defined) */
4545
4546 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
4547
4548 OutUP->RetCode = is_io_service_wait_quiet(service, wait_time: In0UP->wait_time);
4549 iokit_remove_reference(obj: service);
4550#if __MigKernelSpecificCode
4551#endif /* __MigKernelSpecificCode */
4552
4553 OutUP->NDR = NDR_record;
4554
4555
4556 __AfterRcvRpc(2832, "io_service_wait_quiet")
4557}
4558
4559#if ( __MigTypeCheck )
4560#if __MIG_check__Request__iokit_subsystem__
4561#if !defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined)
4562#define __MIG_check__Request__io_registry_entry_create_iterator_t__defined
4563
4564mig_internal kern_return_t __MIG_check__Request__io_registry_entry_create_iterator_t(
4565 __attribute__((__unused__)) __RequestKData__io_registry_entry_create_iterator_t *InKP,
4566 __attribute__((__unused__)) __RequestUData__io_registry_entry_create_iterator_t *In0UP,
4567 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4568 __attribute__((__unused__)) __RequestUData__io_registry_entry_create_iterator_t **In1UPP)
4569{
4570
4571 typedef __Request__io_registry_entry_create_iterator_t __Request;
4572 typedef __RequestUData__io_registry_entry_create_iterator_t __RequestU __attribute__((unused));
4573 __RequestU *In1UP;
4574#if __MigTypeCheck
4575 unsigned int msgh_size;
4576#endif /* __MigTypeCheck */
4577 unsigned int msgh_size_delta;
4578
4579#if __MigTypeCheck
4580 msgh_size = InKP->Head.msgh_size;
4581 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4582 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
4583 return MIG_BAD_ARGUMENTS;
4584#endif /* __MigTypeCheck */
4585
4586#if defined(__NDR_convert__int_rep__Request__io_registry_entry_create_iterator_t__planeCnt__defined)
4587 if (In0UP->NDR.int_rep != NDR_record.int_rep)
4588 __NDR_convert__int_rep__Request__io_registry_entry_create_iterator_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
4589#endif /* __NDR_convert__int_rep__Request__io_registry_entry_create_iterator_t__planeCnt__defined */
4590 msgh_size_delta = _WALIGN_(In0UP->planeCnt);
4591#if __MigTypeCheck
4592 if (In0UP->planeCnt > 128)
4593 return MIG_BAD_ARGUMENTS;
4594 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
4595 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
4596 return MIG_BAD_ARGUMENTS;
4597#endif /* __MigTypeCheck */
4598
4599 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
4600
4601#if __MigTypeCheck
4602 {
4603 char * msg_limit = (char *) InTrailerP;
4604#if __MigKernelSpecificCode
4605 size_t strnlen_limit;
4606#else
4607 size_t memchr_limit;
4608#endif /* __MigKernelSpecificCode */
4609
4610#if __MigKernelSpecificCode
4611 strnlen_limit = min((msg_limit - In0UP->plane), 128);
4612 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
4613 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
4614#else
4615 memchr_limit = min((msg_limit - In0UP->plane), 128);
4616 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
4617 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
4618#endif /* __MigKernelSpecificCode */
4619 }
4620#endif /* __MigTypeCheck */
4621
4622 return MACH_MSG_SUCCESS;
4623}
4624#endif /* !defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined) */
4625#endif /* __MIG_check__Request__iokit_subsystem__ */
4626#endif /* ( __MigTypeCheck ) */
4627
4628
4629/* Routine io_registry_entry_create_iterator */
4630mig_internal novalue _Xio_registry_entry_create_iterator
4631 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4632 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4633 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4634{
4635
4636#ifdef __MigPackStructs
4637#pragma pack(push, 4)
4638#endif
4639 typedef struct {
4640 NDR_record_t NDR;
4641 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
4642 mach_msg_type_number_t planeCnt;
4643 char plane[128];
4644 uint32_t options;
4645 mach_msg_trailer_t trailer;
4646 char padding[0]; /* Avoid generating empty UData structs */
4647 } RequestU __attribute__((unused));
4648#ifdef __MigPackStructs
4649#pragma pack(pop)
4650#endif
4651 typedef __RequestKData__io_registry_entry_create_iterator_t RequestK;
4652 typedef __RequestUData__io_registry_entry_create_iterator_t __RequestU;
4653 typedef __ReplyKData__io_registry_entry_create_iterator_t ReplyK __attribute__((unused));
4654 typedef __ReplyUData__io_registry_entry_create_iterator_t ReplyU __attribute__((unused));
4655 typedef __Reply__io_registry_entry_create_iterator_t Reply __attribute__((unused));
4656 typedef __Request__io_registry_entry_create_iterator_t __Request __attribute__((unused));
4657
4658 /*
4659 * typedef struct {
4660 * mach_msg_header_t Head;
4661 * NDR_record_t NDR;
4662 * kern_return_t RetCode;
4663 * } mig_reply_error_t;
4664 */
4665
4666 RequestK *InKP = (RequestK *) InHeadP;
4667 RequestU *In0UP = (RequestU *) InDataP;
4668 RequestU *In1UP;
4669 ReplyK *OutKP = (ReplyK *) OutHeadP;
4670 ReplyU *OutUP = (ReplyU *) OutDataP;
4671 (void)OutUP;
4672#ifdef __MIG_check__Request__io_registry_entry_create_iterator_t__defined
4673 kern_return_t check_result;
4674#endif /* __MIG_check__Request__io_registry_entry_create_iterator_t__defined */
4675
4676#if __MigKernelSpecificCode
4677#if UseStaticTemplates
4678 const static mach_msg_port_descriptor_t iteratorTemplate = {
4679 /* name = */ MACH_PORT_NULL,
4680 /* pad1 = */ 0,
4681 /* pad2 = */ 0,
4682 /* disp = */ 17,
4683 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
4684 };
4685#endif /* UseStaticTemplates */
4686
4687#else
4688#if UseStaticTemplates
4689 const static mach_msg_port_descriptor_t iteratorTemplate = {
4690 /* name = */ MACH_PORT_NULL,
4691 /* pad1 = */ 0,
4692 /* pad2 = */ 0,
4693 /* disp = */ 19,
4694 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
4695 };
4696#endif /* UseStaticTemplates */
4697
4698#endif /* __MigKernelSpecificCode */
4699 kern_return_t RetCode;
4700 io_object_t registry_entry;
4701 io_object_t iterator;
4702
4703 __DeclareRcvRpc(2833, "io_registry_entry_create_iterator")
4704 __BeforeRcvRpc(2833, "io_registry_entry_create_iterator")
4705
4706#if defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined)
4707 check_result = __MIG_check__Request__io_registry_entry_create_iterator_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
4708 if (check_result != MACH_MSG_SUCCESS)
4709 { MIG_RETURN_ERROR(OutKP, check_result); }
4710#endif /* defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined) */
4711
4712#if UseStaticTemplates
4713 OutKP->iterator = iteratorTemplate;
4714#else /* UseStaticTemplates */
4715#if __MigKernelSpecificCode
4716 OutKP->iterator.disposition = 17;
4717#else
4718 OutKP->iterator.disposition = 19;
4719#endif /* __MigKernelSpecificCode */
4720#if !(defined(KERNEL) && defined(__LP64__))
4721 OutKP->iterator.pad1 = 0;
4722#endif
4723 OutKP->iterator.pad2 = 0;
4724 OutKP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
4725#if defined(KERNEL)
4726 OutKP->iterator.pad_end = 0;
4727#endif
4728#endif /* UseStaticTemplates */
4729
4730
4731 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
4732
4733 RetCode = is_io_registry_entry_create_iterator(registry_entry, plane: In0UP->plane, options: In1UP->options, iterator: &iterator);
4734 iokit_remove_reference(obj: registry_entry);
4735 if (RetCode != KERN_SUCCESS) {
4736 MIG_RETURN_ERROR(OutKP, RetCode);
4737 }
4738#if __MigKernelSpecificCode
4739#endif /* __MigKernelSpecificCode */
4740 OutKP->iterator.name = (mach_port_t)iokit_make_object_port(obj: iterator);
4741
4742
4743 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
4744 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4745 OutKP->msgh_body.msgh_descriptor_count = 1;
4746 __AfterRcvRpc(2833, "io_registry_entry_create_iterator")
4747}
4748
4749#if ( __MigTypeCheck )
4750#if __MIG_check__Request__iokit_subsystem__
4751#if !defined(__MIG_check__Request__io_iterator_is_valid_t__defined)
4752#define __MIG_check__Request__io_iterator_is_valid_t__defined
4753
4754mig_internal kern_return_t __MIG_check__Request__io_iterator_is_valid_t(
4755 __attribute__((__unused__)) __RequestKData__io_iterator_is_valid_t *InKP,
4756 __attribute__((__unused__)) __RequestUData__io_iterator_is_valid_t *In0UP,
4757 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4758{
4759
4760 typedef __Request__io_iterator_is_valid_t __Request;
4761 typedef __RequestUData__io_iterator_is_valid_t __RequestU __attribute__((unused));
4762#if __MigTypeCheck
4763 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4764 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4765 return MIG_BAD_ARGUMENTS;
4766#endif /* __MigTypeCheck */
4767
4768 return MACH_MSG_SUCCESS;
4769}
4770#endif /* !defined(__MIG_check__Request__io_iterator_is_valid_t__defined) */
4771#endif /* __MIG_check__Request__iokit_subsystem__ */
4772#endif /* ( __MigTypeCheck ) */
4773
4774
4775/* Routine io_iterator_is_valid */
4776mig_internal novalue _Xio_iterator_is_valid
4777 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4778 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4779 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4780{
4781
4782#ifdef __MigPackStructs
4783#pragma pack(push, 4)
4784#endif
4785 typedef struct {
4786 mach_msg_trailer_t trailer;
4787 char padding[0]; /* Avoid generating empty UData structs */
4788 } RequestU __attribute__((unused));
4789#ifdef __MigPackStructs
4790#pragma pack(pop)
4791#endif
4792 typedef __RequestKData__io_iterator_is_valid_t RequestK;
4793 typedef __RequestUData__io_iterator_is_valid_t __RequestU;
4794 typedef __ReplyKData__io_iterator_is_valid_t ReplyK __attribute__((unused));
4795 typedef __ReplyUData__io_iterator_is_valid_t ReplyU __attribute__((unused));
4796 typedef __Reply__io_iterator_is_valid_t Reply __attribute__((unused));
4797 typedef __Request__io_iterator_is_valid_t __Request __attribute__((unused));
4798
4799 /*
4800 * typedef struct {
4801 * mach_msg_header_t Head;
4802 * NDR_record_t NDR;
4803 * kern_return_t RetCode;
4804 * } mig_reply_error_t;
4805 */
4806
4807 RequestK *InKP = (RequestK *) InHeadP;
4808 RequestU *In0UP = (RequestU *) InDataP;
4809 ReplyK *OutKP = (ReplyK *) OutHeadP;
4810 ReplyU *OutUP = (ReplyU *) OutDataP;
4811 (void)OutUP;
4812#ifdef __MIG_check__Request__io_iterator_is_valid_t__defined
4813 kern_return_t check_result;
4814#endif /* __MIG_check__Request__io_iterator_is_valid_t__defined */
4815
4816#if __MigKernelSpecificCode
4817#else
4818#endif /* __MigKernelSpecificCode */
4819 io_object_t iterator;
4820
4821 __DeclareRcvRpc(2834, "io_iterator_is_valid")
4822 __BeforeRcvRpc(2834, "io_iterator_is_valid")
4823
4824#if defined(__MIG_check__Request__io_iterator_is_valid_t__defined)
4825 check_result = __MIG_check__Request__io_iterator_is_valid_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4826 if (check_result != MACH_MSG_SUCCESS)
4827 { MIG_RETURN_ERROR(OutKP, check_result); }
4828#endif /* defined(__MIG_check__Request__io_iterator_is_valid_t__defined) */
4829
4830 iterator = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
4831
4832 OutUP->RetCode = is_io_iterator_is_valid(iterator, is_valid: &OutUP->is_valid);
4833 iokit_remove_reference(obj: iterator);
4834 if (OutUP->RetCode != KERN_SUCCESS) {
4835 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4836 }
4837#if __MigKernelSpecificCode
4838#endif /* __MigKernelSpecificCode */
4839
4840 OutUP->NDR = NDR_record;
4841
4842
4843 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4844 __AfterRcvRpc(2834, "io_iterator_is_valid")
4845}
4846
4847#if ( __MigTypeCheck )
4848#if __MIG_check__Request__iokit_subsystem__
4849#if !defined(__MIG_check__Request__io_catalog_send_data_t__defined)
4850#define __MIG_check__Request__io_catalog_send_data_t__defined
4851
4852mig_internal kern_return_t __MIG_check__Request__io_catalog_send_data_t(
4853 __attribute__((__unused__)) __RequestKData__io_catalog_send_data_t *InKP,
4854 __attribute__((__unused__)) __RequestUData__io_catalog_send_data_t *In0UP,
4855 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4856{
4857
4858 typedef __Request__io_catalog_send_data_t __Request;
4859 typedef __RequestUData__io_catalog_send_data_t __RequestU __attribute__((unused));
4860#if __MigTypeCheck
4861 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4862 (InKP->msgh_body.msgh_descriptor_count != 1) ||
4863 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
4864 return MIG_BAD_ARGUMENTS;
4865#endif /* __MigTypeCheck */
4866
4867#if __MigTypeCheck
4868 if (InKP->inData.type != MACH_MSG_OOL_DESCRIPTOR)
4869 return MIG_TYPE_ERROR;
4870#endif /* __MigTypeCheck */
4871
4872#if __MigTypeCheck
4873 if (InKP->inData.size != In0UP->inDataCnt)
4874 return MIG_TYPE_ERROR;
4875#endif /* __MigTypeCheck */
4876
4877 return MACH_MSG_SUCCESS;
4878}
4879#endif /* !defined(__MIG_check__Request__io_catalog_send_data_t__defined) */
4880#endif /* __MIG_check__Request__iokit_subsystem__ */
4881#endif /* ( __MigTypeCheck ) */
4882
4883
4884/* Routine io_catalog_send_data */
4885mig_internal novalue _Xio_catalog_send_data
4886 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
4887 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
4888 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
4889{
4890
4891#ifdef __MigPackStructs
4892#pragma pack(push, 4)
4893#endif
4894 typedef struct {
4895 NDR_record_t NDR;
4896 uint32_t flag;
4897 mach_msg_type_number_t inDataCnt;
4898 mach_msg_trailer_t trailer;
4899 char padding[0]; /* Avoid generating empty UData structs */
4900 } RequestU __attribute__((unused));
4901#ifdef __MigPackStructs
4902#pragma pack(pop)
4903#endif
4904 typedef __RequestKData__io_catalog_send_data_t RequestK;
4905 typedef __RequestUData__io_catalog_send_data_t __RequestU;
4906 typedef __ReplyKData__io_catalog_send_data_t ReplyK __attribute__((unused));
4907 typedef __ReplyUData__io_catalog_send_data_t ReplyU __attribute__((unused));
4908 typedef __Reply__io_catalog_send_data_t Reply __attribute__((unused));
4909 typedef __Request__io_catalog_send_data_t __Request __attribute__((unused));
4910
4911 /*
4912 * typedef struct {
4913 * mach_msg_header_t Head;
4914 * NDR_record_t NDR;
4915 * kern_return_t RetCode;
4916 * } mig_reply_error_t;
4917 */
4918
4919 RequestK *InKP = (RequestK *) InHeadP;
4920 RequestU *In0UP = (RequestU *) InDataP;
4921 ReplyK *OutKP = (ReplyK *) OutHeadP;
4922 ReplyU *OutUP = (ReplyU *) OutDataP;
4923 (void)OutUP;
4924#ifdef __MIG_check__Request__io_catalog_send_data_t__defined
4925 kern_return_t check_result;
4926#endif /* __MIG_check__Request__io_catalog_send_data_t__defined */
4927
4928#if __MigKernelSpecificCode
4929#else
4930#endif /* __MigKernelSpecificCode */
4931 __DeclareRcvRpc(2836, "io_catalog_send_data")
4932 __BeforeRcvRpc(2836, "io_catalog_send_data")
4933
4934#if defined(__MIG_check__Request__io_catalog_send_data_t__defined)
4935 check_result = __MIG_check__Request__io_catalog_send_data_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
4936 if (check_result != MACH_MSG_SUCCESS)
4937 { MIG_RETURN_ERROR(OutKP, check_result); }
4938#endif /* defined(__MIG_check__Request__io_catalog_send_data_t__defined) */
4939
4940 OutUP->RetCode = is_io_catalog_send_data(main_port: InKP->Head.msgh_request_port, flag: In0UP->flag, inData: (io_buf_ptr_t)(InKP->inData.address), inDataCnt: InKP->inData.size, result: &OutUP->result);
4941 if (OutUP->RetCode != KERN_SUCCESS) {
4942 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
4943 }
4944#if __MigKernelSpecificCode
4945#endif /* __MigKernelSpecificCode */
4946
4947 OutUP->NDR = NDR_record;
4948
4949
4950 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
4951 __AfterRcvRpc(2836, "io_catalog_send_data")
4952}
4953
4954#if ( __MigTypeCheck )
4955#if __MIG_check__Request__iokit_subsystem__
4956#if !defined(__MIG_check__Request__io_catalog_terminate_t__defined)
4957#define __MIG_check__Request__io_catalog_terminate_t__defined
4958
4959mig_internal kern_return_t __MIG_check__Request__io_catalog_terminate_t(
4960 __attribute__((__unused__)) __RequestKData__io_catalog_terminate_t *InKP,
4961 __attribute__((__unused__)) __RequestUData__io_catalog_terminate_t *In0UP,
4962 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
4963{
4964
4965 typedef __Request__io_catalog_terminate_t __Request;
4966 typedef __RequestUData__io_catalog_terminate_t __RequestU __attribute__((unused));
4967#if __MigTypeCheck
4968 unsigned int msgh_size;
4969#endif /* __MigTypeCheck */
4970
4971#if __MigTypeCheck
4972 msgh_size = InKP->Head.msgh_size;
4973 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
4974 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
4975 return MIG_BAD_ARGUMENTS;
4976#endif /* __MigTypeCheck */
4977
4978#if defined(__NDR_convert__int_rep__Request__io_catalog_terminate_t__nameCnt__defined)
4979 if (In0UP->NDR.int_rep != NDR_record.int_rep)
4980 __NDR_convert__int_rep__Request__io_catalog_terminate_t__nameCnt(&In0UP->nameCnt, In0UP->NDR.int_rep);
4981#endif /* __NDR_convert__int_rep__Request__io_catalog_terminate_t__nameCnt__defined */
4982#if __MigTypeCheck
4983 if (In0UP->nameCnt > 128)
4984 return MIG_BAD_ARGUMENTS;
4985 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->nameCnt) ||
4986 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->nameCnt)))
4987 return MIG_BAD_ARGUMENTS;
4988#endif /* __MigTypeCheck */
4989
4990#if __MigTypeCheck
4991 {
4992 char * msg_limit = (char *) InTrailerP;
4993#if __MigKernelSpecificCode
4994 size_t strnlen_limit;
4995#else
4996 size_t memchr_limit;
4997#endif /* __MigKernelSpecificCode */
4998
4999#if __MigKernelSpecificCode
5000 strnlen_limit = min((msg_limit - In0UP->name), 128);
5001 if (( strnlen(s: In0UP->name, n: strnlen_limit) >= 128 + 1 ))
5002 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5003#else
5004 memchr_limit = min((msg_limit - In0UP->name), 128);
5005 if (( memchr(In0UP->name, '\0', memchr_limit) == NULL ))
5006 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5007#endif /* __MigKernelSpecificCode */
5008 }
5009#endif /* __MigTypeCheck */
5010
5011 return MACH_MSG_SUCCESS;
5012}
5013#endif /* !defined(__MIG_check__Request__io_catalog_terminate_t__defined) */
5014#endif /* __MIG_check__Request__iokit_subsystem__ */
5015#endif /* ( __MigTypeCheck ) */
5016
5017
5018/* Routine io_catalog_terminate */
5019mig_internal novalue _Xio_catalog_terminate
5020 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5021 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5022 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5023{
5024
5025#ifdef __MigPackStructs
5026#pragma pack(push, 4)
5027#endif
5028 typedef struct {
5029 NDR_record_t NDR;
5030 uint32_t flag;
5031 mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
5032 mach_msg_type_number_t nameCnt;
5033 char name[128];
5034 mach_msg_trailer_t trailer;
5035 char padding[0]; /* Avoid generating empty UData structs */
5036 } RequestU __attribute__((unused));
5037#ifdef __MigPackStructs
5038#pragma pack(pop)
5039#endif
5040 typedef __RequestKData__io_catalog_terminate_t RequestK;
5041 typedef __RequestUData__io_catalog_terminate_t __RequestU;
5042 typedef __ReplyKData__io_catalog_terminate_t ReplyK __attribute__((unused));
5043 typedef __ReplyUData__io_catalog_terminate_t ReplyU __attribute__((unused));
5044 typedef __Reply__io_catalog_terminate_t Reply __attribute__((unused));
5045 typedef __Request__io_catalog_terminate_t __Request __attribute__((unused));
5046
5047 /*
5048 * typedef struct {
5049 * mach_msg_header_t Head;
5050 * NDR_record_t NDR;
5051 * kern_return_t RetCode;
5052 * } mig_reply_error_t;
5053 */
5054
5055 RequestK *InKP = (RequestK *) InHeadP;
5056 RequestU *In0UP = (RequestU *) InDataP;
5057 ReplyK *OutKP = (ReplyK *) OutHeadP;
5058 ReplyU *OutUP = (ReplyU *) OutDataP;
5059 (void)OutUP;
5060#ifdef __MIG_check__Request__io_catalog_terminate_t__defined
5061 kern_return_t check_result;
5062#endif /* __MIG_check__Request__io_catalog_terminate_t__defined */
5063
5064#if __MigKernelSpecificCode
5065#else
5066#endif /* __MigKernelSpecificCode */
5067 __DeclareRcvRpc(2837, "io_catalog_terminate")
5068 __BeforeRcvRpc(2837, "io_catalog_terminate")
5069
5070#if defined(__MIG_check__Request__io_catalog_terminate_t__defined)
5071 check_result = __MIG_check__Request__io_catalog_terminate_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5072 if (check_result != MACH_MSG_SUCCESS)
5073 { MIG_RETURN_ERROR(OutKP, check_result); }
5074#endif /* defined(__MIG_check__Request__io_catalog_terminate_t__defined) */
5075
5076 OutUP->RetCode = is_io_catalog_terminate(main_port: InKP->Head.msgh_request_port, flag: In0UP->flag, name: In0UP->name);
5077#if __MigKernelSpecificCode
5078#endif /* __MigKernelSpecificCode */
5079
5080 OutUP->NDR = NDR_record;
5081
5082
5083 __AfterRcvRpc(2837, "io_catalog_terminate")
5084}
5085
5086#if ( __MigTypeCheck )
5087#if __MIG_check__Request__iokit_subsystem__
5088#if !defined(__MIG_check__Request__io_catalog_get_data_t__defined)
5089#define __MIG_check__Request__io_catalog_get_data_t__defined
5090
5091mig_internal kern_return_t __MIG_check__Request__io_catalog_get_data_t(
5092 __attribute__((__unused__)) __RequestKData__io_catalog_get_data_t *InKP,
5093 __attribute__((__unused__)) __RequestUData__io_catalog_get_data_t *In0UP,
5094 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5095{
5096
5097 typedef __Request__io_catalog_get_data_t __Request;
5098 typedef __RequestUData__io_catalog_get_data_t __RequestU __attribute__((unused));
5099#if __MigTypeCheck
5100 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5101 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5102 return MIG_BAD_ARGUMENTS;
5103#endif /* __MigTypeCheck */
5104
5105 return MACH_MSG_SUCCESS;
5106}
5107#endif /* !defined(__MIG_check__Request__io_catalog_get_data_t__defined) */
5108#endif /* __MIG_check__Request__iokit_subsystem__ */
5109#endif /* ( __MigTypeCheck ) */
5110
5111
5112/* Routine io_catalog_get_data */
5113mig_internal novalue _Xio_catalog_get_data
5114 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5115 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5116 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5117{
5118
5119#ifdef __MigPackStructs
5120#pragma pack(push, 4)
5121#endif
5122 typedef struct {
5123 NDR_record_t NDR;
5124 uint32_t flag;
5125 mach_msg_trailer_t trailer;
5126 char padding[0]; /* Avoid generating empty UData structs */
5127 } RequestU __attribute__((unused));
5128#ifdef __MigPackStructs
5129#pragma pack(pop)
5130#endif
5131 typedef __RequestKData__io_catalog_get_data_t RequestK;
5132 typedef __RequestUData__io_catalog_get_data_t __RequestU;
5133 typedef __ReplyKData__io_catalog_get_data_t ReplyK __attribute__((unused));
5134 typedef __ReplyUData__io_catalog_get_data_t ReplyU __attribute__((unused));
5135 typedef __Reply__io_catalog_get_data_t Reply __attribute__((unused));
5136 typedef __Request__io_catalog_get_data_t __Request __attribute__((unused));
5137
5138 /*
5139 * typedef struct {
5140 * mach_msg_header_t Head;
5141 * NDR_record_t NDR;
5142 * kern_return_t RetCode;
5143 * } mig_reply_error_t;
5144 */
5145
5146 RequestK *InKP = (RequestK *) InHeadP;
5147 RequestU *In0UP = (RequestU *) InDataP;
5148 ReplyK *OutKP = (ReplyK *) OutHeadP;
5149 ReplyU *OutUP = (ReplyU *) OutDataP;
5150 (void)OutUP;
5151#ifdef __MIG_check__Request__io_catalog_get_data_t__defined
5152 kern_return_t check_result;
5153#endif /* __MIG_check__Request__io_catalog_get_data_t__defined */
5154
5155#if __MigKernelSpecificCode
5156#if UseStaticTemplates
5157 const static mach_msg_ool_descriptor_t outDataTemplate = {
5158 /* addr = */ (void *)0,
5159 /* size = */ 0,
5160 /* deal = */ FALSE,
5161 /* copy = */ MACH_MSG_VIRTUAL_COPY,
5162 /* pad2 = */ 0,
5163 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
5164 };
5165#endif /* UseStaticTemplates */
5166
5167#else
5168#if UseStaticTemplates
5169 const static mach_msg_ool_descriptor_t outDataTemplate = {
5170 /* addr = */ (void *)0,
5171 /* size = */ 0,
5172 /* deal = */ FALSE,
5173 /* copy = */ MACH_MSG_VIRTUAL_COPY,
5174 /* pad2 = */ 0,
5175 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
5176 };
5177#endif /* UseStaticTemplates */
5178
5179#endif /* __MigKernelSpecificCode */
5180 kern_return_t RetCode;
5181 __DeclareRcvRpc(2838, "io_catalog_get_data")
5182 __BeforeRcvRpc(2838, "io_catalog_get_data")
5183
5184#if defined(__MIG_check__Request__io_catalog_get_data_t__defined)
5185 check_result = __MIG_check__Request__io_catalog_get_data_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5186 if (check_result != MACH_MSG_SUCCESS)
5187 { MIG_RETURN_ERROR(OutKP, check_result); }
5188#endif /* defined(__MIG_check__Request__io_catalog_get_data_t__defined) */
5189
5190#if UseStaticTemplates
5191 OutKP->outData = outDataTemplate;
5192#else /* UseStaticTemplates */
5193 OutKP->outData.deallocate = FALSE;
5194 OutKP->outData.copy = MACH_MSG_VIRTUAL_COPY;
5195 OutKP->outData.pad1 = 0;
5196 OutKP->outData.type = MACH_MSG_OOL_DESCRIPTOR;
5197#if defined(KERNEL) && !defined(__LP64__)
5198 OutKP->outData.pad_end = 0;
5199#endif
5200#endif /* UseStaticTemplates */
5201
5202
5203 RetCode = is_io_catalog_get_data(main_port: InKP->Head.msgh_request_port, flag: In0UP->flag, outData: (io_buf_ptr_t *)&(OutKP->outData.address), outDataCnt: &OutUP->outDataCnt);
5204 if (RetCode != KERN_SUCCESS) {
5205 MIG_RETURN_ERROR(OutKP, RetCode);
5206 }
5207#if __MigKernelSpecificCode
5208#endif /* __MigKernelSpecificCode */
5209 OutKP->outData.size = OutUP->outDataCnt;
5210
5211
5212 OutUP->NDR = NDR_record;
5213
5214
5215 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
5216 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
5217 OutKP->msgh_body.msgh_descriptor_count = 1;
5218 __AfterRcvRpc(2838, "io_catalog_get_data")
5219}
5220
5221#if ( __MigTypeCheck )
5222#if __MIG_check__Request__iokit_subsystem__
5223#if !defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined)
5224#define __MIG_check__Request__io_catalog_get_gen_count_t__defined
5225
5226mig_internal kern_return_t __MIG_check__Request__io_catalog_get_gen_count_t(
5227 __attribute__((__unused__)) __RequestKData__io_catalog_get_gen_count_t *InKP,
5228 __attribute__((__unused__)) __RequestUData__io_catalog_get_gen_count_t *In0UP,
5229 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5230{
5231
5232 typedef __Request__io_catalog_get_gen_count_t __Request;
5233 typedef __RequestUData__io_catalog_get_gen_count_t __RequestU __attribute__((unused));
5234#if __MigTypeCheck
5235 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5236 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5237 return MIG_BAD_ARGUMENTS;
5238#endif /* __MigTypeCheck */
5239
5240 return MACH_MSG_SUCCESS;
5241}
5242#endif /* !defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined) */
5243#endif /* __MIG_check__Request__iokit_subsystem__ */
5244#endif /* ( __MigTypeCheck ) */
5245
5246
5247/* Routine io_catalog_get_gen_count */
5248mig_internal novalue _Xio_catalog_get_gen_count
5249 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5250 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5251 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5252{
5253
5254#ifdef __MigPackStructs
5255#pragma pack(push, 4)
5256#endif
5257 typedef struct {
5258 mach_msg_trailer_t trailer;
5259 char padding[0]; /* Avoid generating empty UData structs */
5260 } RequestU __attribute__((unused));
5261#ifdef __MigPackStructs
5262#pragma pack(pop)
5263#endif
5264 typedef __RequestKData__io_catalog_get_gen_count_t RequestK;
5265 typedef __RequestUData__io_catalog_get_gen_count_t __RequestU;
5266 typedef __ReplyKData__io_catalog_get_gen_count_t ReplyK __attribute__((unused));
5267 typedef __ReplyUData__io_catalog_get_gen_count_t ReplyU __attribute__((unused));
5268 typedef __Reply__io_catalog_get_gen_count_t Reply __attribute__((unused));
5269 typedef __Request__io_catalog_get_gen_count_t __Request __attribute__((unused));
5270
5271 /*
5272 * typedef struct {
5273 * mach_msg_header_t Head;
5274 * NDR_record_t NDR;
5275 * kern_return_t RetCode;
5276 * } mig_reply_error_t;
5277 */
5278
5279 RequestK *InKP = (RequestK *) InHeadP;
5280 RequestU *In0UP = (RequestU *) InDataP;
5281 ReplyK *OutKP = (ReplyK *) OutHeadP;
5282 ReplyU *OutUP = (ReplyU *) OutDataP;
5283 (void)OutUP;
5284#ifdef __MIG_check__Request__io_catalog_get_gen_count_t__defined
5285 kern_return_t check_result;
5286#endif /* __MIG_check__Request__io_catalog_get_gen_count_t__defined */
5287
5288#if __MigKernelSpecificCode
5289#else
5290#endif /* __MigKernelSpecificCode */
5291 __DeclareRcvRpc(2839, "io_catalog_get_gen_count")
5292 __BeforeRcvRpc(2839, "io_catalog_get_gen_count")
5293
5294#if defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined)
5295 check_result = __MIG_check__Request__io_catalog_get_gen_count_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5296 if (check_result != MACH_MSG_SUCCESS)
5297 { MIG_RETURN_ERROR(OutKP, check_result); }
5298#endif /* defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined) */
5299
5300 OutUP->RetCode = is_io_catalog_get_gen_count(main_port: InKP->Head.msgh_request_port, genCount: &OutUP->genCount);
5301 if (OutUP->RetCode != KERN_SUCCESS) {
5302 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
5303 }
5304#if __MigKernelSpecificCode
5305#endif /* __MigKernelSpecificCode */
5306
5307 OutUP->NDR = NDR_record;
5308
5309
5310 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
5311 __AfterRcvRpc(2839, "io_catalog_get_gen_count")
5312}
5313
5314#if ( __MigTypeCheck )
5315#if __MIG_check__Request__iokit_subsystem__
5316#if !defined(__MIG_check__Request__io_catalog_module_loaded_t__defined)
5317#define __MIG_check__Request__io_catalog_module_loaded_t__defined
5318
5319mig_internal kern_return_t __MIG_check__Request__io_catalog_module_loaded_t(
5320 __attribute__((__unused__)) __RequestKData__io_catalog_module_loaded_t *InKP,
5321 __attribute__((__unused__)) __RequestUData__io_catalog_module_loaded_t *In0UP,
5322 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5323{
5324
5325 typedef __Request__io_catalog_module_loaded_t __Request;
5326 typedef __RequestUData__io_catalog_module_loaded_t __RequestU __attribute__((unused));
5327#if __MigTypeCheck
5328 unsigned int msgh_size;
5329#endif /* __MigTypeCheck */
5330
5331#if __MigTypeCheck
5332 msgh_size = InKP->Head.msgh_size;
5333 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5334 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
5335 return MIG_BAD_ARGUMENTS;
5336#endif /* __MigTypeCheck */
5337
5338#if defined(__NDR_convert__int_rep__Request__io_catalog_module_loaded_t__nameCnt__defined)
5339 if (In0UP->NDR.int_rep != NDR_record.int_rep)
5340 __NDR_convert__int_rep__Request__io_catalog_module_loaded_t__nameCnt(&In0UP->nameCnt, In0UP->NDR.int_rep);
5341#endif /* __NDR_convert__int_rep__Request__io_catalog_module_loaded_t__nameCnt__defined */
5342#if __MigTypeCheck
5343 if (In0UP->nameCnt > 128)
5344 return MIG_BAD_ARGUMENTS;
5345 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->nameCnt) ||
5346 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->nameCnt)))
5347 return MIG_BAD_ARGUMENTS;
5348#endif /* __MigTypeCheck */
5349
5350#if __MigTypeCheck
5351 {
5352 char * msg_limit = (char *) InTrailerP;
5353#if __MigKernelSpecificCode
5354 size_t strnlen_limit;
5355#else
5356 size_t memchr_limit;
5357#endif /* __MigKernelSpecificCode */
5358
5359#if __MigKernelSpecificCode
5360 strnlen_limit = min((msg_limit - In0UP->name), 128);
5361 if (( strnlen(s: In0UP->name, n: strnlen_limit) >= 128 + 1 ))
5362 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5363#else
5364 memchr_limit = min((msg_limit - In0UP->name), 128);
5365 if (( memchr(In0UP->name, '\0', memchr_limit) == NULL ))
5366 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5367#endif /* __MigKernelSpecificCode */
5368 }
5369#endif /* __MigTypeCheck */
5370
5371 return MACH_MSG_SUCCESS;
5372}
5373#endif /* !defined(__MIG_check__Request__io_catalog_module_loaded_t__defined) */
5374#endif /* __MIG_check__Request__iokit_subsystem__ */
5375#endif /* ( __MigTypeCheck ) */
5376
5377
5378/* Routine io_catalog_module_loaded */
5379mig_internal novalue _Xio_catalog_module_loaded
5380 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5381 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5382 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5383{
5384
5385#ifdef __MigPackStructs
5386#pragma pack(push, 4)
5387#endif
5388 typedef struct {
5389 NDR_record_t NDR;
5390 mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
5391 mach_msg_type_number_t nameCnt;
5392 char name[128];
5393 mach_msg_trailer_t trailer;
5394 char padding[0]; /* Avoid generating empty UData structs */
5395 } RequestU __attribute__((unused));
5396#ifdef __MigPackStructs
5397#pragma pack(pop)
5398#endif
5399 typedef __RequestKData__io_catalog_module_loaded_t RequestK;
5400 typedef __RequestUData__io_catalog_module_loaded_t __RequestU;
5401 typedef __ReplyKData__io_catalog_module_loaded_t ReplyK __attribute__((unused));
5402 typedef __ReplyUData__io_catalog_module_loaded_t ReplyU __attribute__((unused));
5403 typedef __Reply__io_catalog_module_loaded_t Reply __attribute__((unused));
5404 typedef __Request__io_catalog_module_loaded_t __Request __attribute__((unused));
5405
5406 /*
5407 * typedef struct {
5408 * mach_msg_header_t Head;
5409 * NDR_record_t NDR;
5410 * kern_return_t RetCode;
5411 * } mig_reply_error_t;
5412 */
5413
5414 RequestK *InKP = (RequestK *) InHeadP;
5415 RequestU *In0UP = (RequestU *) InDataP;
5416 ReplyK *OutKP = (ReplyK *) OutHeadP;
5417 ReplyU *OutUP = (ReplyU *) OutDataP;
5418 (void)OutUP;
5419#ifdef __MIG_check__Request__io_catalog_module_loaded_t__defined
5420 kern_return_t check_result;
5421#endif /* __MIG_check__Request__io_catalog_module_loaded_t__defined */
5422
5423#if __MigKernelSpecificCode
5424#else
5425#endif /* __MigKernelSpecificCode */
5426 __DeclareRcvRpc(2840, "io_catalog_module_loaded")
5427 __BeforeRcvRpc(2840, "io_catalog_module_loaded")
5428
5429#if defined(__MIG_check__Request__io_catalog_module_loaded_t__defined)
5430 check_result = __MIG_check__Request__io_catalog_module_loaded_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5431 if (check_result != MACH_MSG_SUCCESS)
5432 { MIG_RETURN_ERROR(OutKP, check_result); }
5433#endif /* defined(__MIG_check__Request__io_catalog_module_loaded_t__defined) */
5434
5435 OutUP->RetCode = is_io_catalog_module_loaded(main_port: InKP->Head.msgh_request_port, name: In0UP->name);
5436#if __MigKernelSpecificCode
5437#endif /* __MigKernelSpecificCode */
5438
5439 OutUP->NDR = NDR_record;
5440
5441
5442 __AfterRcvRpc(2840, "io_catalog_module_loaded")
5443}
5444
5445#if ( __MigTypeCheck )
5446#if __MIG_check__Request__iokit_subsystem__
5447#if !defined(__MIG_check__Request__io_catalog_reset_t__defined)
5448#define __MIG_check__Request__io_catalog_reset_t__defined
5449
5450mig_internal kern_return_t __MIG_check__Request__io_catalog_reset_t(
5451 __attribute__((__unused__)) __RequestKData__io_catalog_reset_t *InKP,
5452 __attribute__((__unused__)) __RequestUData__io_catalog_reset_t *In0UP,
5453 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5454{
5455
5456 typedef __Request__io_catalog_reset_t __Request;
5457 typedef __RequestUData__io_catalog_reset_t __RequestU __attribute__((unused));
5458#if __MigTypeCheck
5459 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5460 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5461 return MIG_BAD_ARGUMENTS;
5462#endif /* __MigTypeCheck */
5463
5464 return MACH_MSG_SUCCESS;
5465}
5466#endif /* !defined(__MIG_check__Request__io_catalog_reset_t__defined) */
5467#endif /* __MIG_check__Request__iokit_subsystem__ */
5468#endif /* ( __MigTypeCheck ) */
5469
5470
5471/* Routine io_catalog_reset */
5472mig_internal novalue _Xio_catalog_reset
5473 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5474 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5475 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5476{
5477
5478#ifdef __MigPackStructs
5479#pragma pack(push, 4)
5480#endif
5481 typedef struct {
5482 NDR_record_t NDR;
5483 uint32_t flag;
5484 mach_msg_trailer_t trailer;
5485 char padding[0]; /* Avoid generating empty UData structs */
5486 } RequestU __attribute__((unused));
5487#ifdef __MigPackStructs
5488#pragma pack(pop)
5489#endif
5490 typedef __RequestKData__io_catalog_reset_t RequestK;
5491 typedef __RequestUData__io_catalog_reset_t __RequestU;
5492 typedef __ReplyKData__io_catalog_reset_t ReplyK __attribute__((unused));
5493 typedef __ReplyUData__io_catalog_reset_t ReplyU __attribute__((unused));
5494 typedef __Reply__io_catalog_reset_t Reply __attribute__((unused));
5495 typedef __Request__io_catalog_reset_t __Request __attribute__((unused));
5496
5497 /*
5498 * typedef struct {
5499 * mach_msg_header_t Head;
5500 * NDR_record_t NDR;
5501 * kern_return_t RetCode;
5502 * } mig_reply_error_t;
5503 */
5504
5505 RequestK *InKP = (RequestK *) InHeadP;
5506 RequestU *In0UP = (RequestU *) InDataP;
5507 ReplyK *OutKP = (ReplyK *) OutHeadP;
5508 ReplyU *OutUP = (ReplyU *) OutDataP;
5509 (void)OutUP;
5510#ifdef __MIG_check__Request__io_catalog_reset_t__defined
5511 kern_return_t check_result;
5512#endif /* __MIG_check__Request__io_catalog_reset_t__defined */
5513
5514#if __MigKernelSpecificCode
5515#else
5516#endif /* __MigKernelSpecificCode */
5517 __DeclareRcvRpc(2841, "io_catalog_reset")
5518 __BeforeRcvRpc(2841, "io_catalog_reset")
5519
5520#if defined(__MIG_check__Request__io_catalog_reset_t__defined)
5521 check_result = __MIG_check__Request__io_catalog_reset_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5522 if (check_result != MACH_MSG_SUCCESS)
5523 { MIG_RETURN_ERROR(OutKP, check_result); }
5524#endif /* defined(__MIG_check__Request__io_catalog_reset_t__defined) */
5525
5526 OutUP->RetCode = is_io_catalog_reset(main_port: InKP->Head.msgh_request_port, flag: In0UP->flag);
5527#if __MigKernelSpecificCode
5528#endif /* __MigKernelSpecificCode */
5529
5530 OutUP->NDR = NDR_record;
5531
5532
5533 __AfterRcvRpc(2841, "io_catalog_reset")
5534}
5535
5536#if ( __MigTypeCheck )
5537#if __MIG_check__Request__iokit_subsystem__
5538#if !defined(__MIG_check__Request__io_service_request_probe_t__defined)
5539#define __MIG_check__Request__io_service_request_probe_t__defined
5540
5541mig_internal kern_return_t __MIG_check__Request__io_service_request_probe_t(
5542 __attribute__((__unused__)) __RequestKData__io_service_request_probe_t *InKP,
5543 __attribute__((__unused__)) __RequestUData__io_service_request_probe_t *In0UP,
5544 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5545{
5546
5547 typedef __Request__io_service_request_probe_t __Request;
5548 typedef __RequestUData__io_service_request_probe_t __RequestU __attribute__((unused));
5549#if __MigTypeCheck
5550 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5551 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
5552 return MIG_BAD_ARGUMENTS;
5553#endif /* __MigTypeCheck */
5554
5555 return MACH_MSG_SUCCESS;
5556}
5557#endif /* !defined(__MIG_check__Request__io_service_request_probe_t__defined) */
5558#endif /* __MIG_check__Request__iokit_subsystem__ */
5559#endif /* ( __MigTypeCheck ) */
5560
5561
5562/* Routine io_service_request_probe */
5563mig_internal novalue _Xio_service_request_probe
5564 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5565 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5566 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5567{
5568
5569#ifdef __MigPackStructs
5570#pragma pack(push, 4)
5571#endif
5572 typedef struct {
5573 NDR_record_t NDR;
5574 uint32_t options;
5575 mach_msg_trailer_t trailer;
5576 char padding[0]; /* Avoid generating empty UData structs */
5577 } RequestU __attribute__((unused));
5578#ifdef __MigPackStructs
5579#pragma pack(pop)
5580#endif
5581 typedef __RequestKData__io_service_request_probe_t RequestK;
5582 typedef __RequestUData__io_service_request_probe_t __RequestU;
5583 typedef __ReplyKData__io_service_request_probe_t ReplyK __attribute__((unused));
5584 typedef __ReplyUData__io_service_request_probe_t ReplyU __attribute__((unused));
5585 typedef __Reply__io_service_request_probe_t Reply __attribute__((unused));
5586 typedef __Request__io_service_request_probe_t __Request __attribute__((unused));
5587
5588 /*
5589 * typedef struct {
5590 * mach_msg_header_t Head;
5591 * NDR_record_t NDR;
5592 * kern_return_t RetCode;
5593 * } mig_reply_error_t;
5594 */
5595
5596 RequestK *InKP = (RequestK *) InHeadP;
5597 RequestU *In0UP = (RequestU *) InDataP;
5598 ReplyK *OutKP = (ReplyK *) OutHeadP;
5599 ReplyU *OutUP = (ReplyU *) OutDataP;
5600 (void)OutUP;
5601#ifdef __MIG_check__Request__io_service_request_probe_t__defined
5602 kern_return_t check_result;
5603#endif /* __MIG_check__Request__io_service_request_probe_t__defined */
5604
5605#if __MigKernelSpecificCode
5606#else
5607#endif /* __MigKernelSpecificCode */
5608 io_object_t service;
5609
5610 __DeclareRcvRpc(2842, "io_service_request_probe")
5611 __BeforeRcvRpc(2842, "io_service_request_probe")
5612
5613#if defined(__MIG_check__Request__io_service_request_probe_t__defined)
5614 check_result = __MIG_check__Request__io_service_request_probe_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5615 if (check_result != MACH_MSG_SUCCESS)
5616 { MIG_RETURN_ERROR(OutKP, check_result); }
5617#endif /* defined(__MIG_check__Request__io_service_request_probe_t__defined) */
5618
5619 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
5620
5621 OutUP->RetCode = is_io_service_request_probe(service, options: In0UP->options);
5622 iokit_remove_reference(obj: service);
5623#if __MigKernelSpecificCode
5624#endif /* __MigKernelSpecificCode */
5625
5626 OutUP->NDR = NDR_record;
5627
5628
5629 __AfterRcvRpc(2842, "io_service_request_probe")
5630}
5631
5632#if ( __MigTypeCheck )
5633#if __MIG_check__Request__iokit_subsystem__
5634#if !defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined)
5635#define __MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined
5636
5637mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_name_in_plane_t(
5638 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_name_in_plane_t *InKP,
5639 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_name_in_plane_t *In0UP,
5640 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5641{
5642
5643 typedef __Request__io_registry_entry_get_name_in_plane_t __Request;
5644 typedef __RequestUData__io_registry_entry_get_name_in_plane_t __RequestU __attribute__((unused));
5645#if __MigTypeCheck
5646 unsigned int msgh_size;
5647#endif /* __MigTypeCheck */
5648
5649#if __MigTypeCheck
5650 msgh_size = InKP->Head.msgh_size;
5651 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5652 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
5653 return MIG_BAD_ARGUMENTS;
5654#endif /* __MigTypeCheck */
5655
5656#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_name_in_plane_t__planeCnt__defined)
5657 if (In0UP->NDR.int_rep != NDR_record.int_rep)
5658 __NDR_convert__int_rep__Request__io_registry_entry_get_name_in_plane_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
5659#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_name_in_plane_t__planeCnt__defined */
5660#if __MigTypeCheck
5661 if (In0UP->planeCnt > 128)
5662 return MIG_BAD_ARGUMENTS;
5663 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
5664 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
5665 return MIG_BAD_ARGUMENTS;
5666#endif /* __MigTypeCheck */
5667
5668#if __MigTypeCheck
5669 {
5670 char * msg_limit = (char *) InTrailerP;
5671#if __MigKernelSpecificCode
5672 size_t strnlen_limit;
5673#else
5674 size_t memchr_limit;
5675#endif /* __MigKernelSpecificCode */
5676
5677#if __MigKernelSpecificCode
5678 strnlen_limit = min((msg_limit - In0UP->plane), 128);
5679 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
5680 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5681#else
5682 memchr_limit = min((msg_limit - In0UP->plane), 128);
5683 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
5684 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5685#endif /* __MigKernelSpecificCode */
5686 }
5687#endif /* __MigTypeCheck */
5688
5689 return MACH_MSG_SUCCESS;
5690}
5691#endif /* !defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined) */
5692#endif /* __MIG_check__Request__iokit_subsystem__ */
5693#endif /* ( __MigTypeCheck ) */
5694
5695
5696/* Routine io_registry_entry_get_name_in_plane */
5697mig_internal novalue _Xio_registry_entry_get_name_in_plane
5698 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5699 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5700 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5701{
5702
5703#ifdef __MigPackStructs
5704#pragma pack(push, 4)
5705#endif
5706 typedef struct {
5707 NDR_record_t NDR;
5708 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
5709 mach_msg_type_number_t planeCnt;
5710 char plane[128];
5711 mach_msg_trailer_t trailer;
5712 char padding[0]; /* Avoid generating empty UData structs */
5713 } RequestU __attribute__((unused));
5714#ifdef __MigPackStructs
5715#pragma pack(pop)
5716#endif
5717 typedef __RequestKData__io_registry_entry_get_name_in_plane_t RequestK;
5718 typedef __RequestUData__io_registry_entry_get_name_in_plane_t __RequestU;
5719 typedef __ReplyKData__io_registry_entry_get_name_in_plane_t ReplyK __attribute__((unused));
5720 typedef __ReplyUData__io_registry_entry_get_name_in_plane_t ReplyU __attribute__((unused));
5721 typedef __Reply__io_registry_entry_get_name_in_plane_t Reply __attribute__((unused));
5722 typedef __Request__io_registry_entry_get_name_in_plane_t __Request __attribute__((unused));
5723
5724 /*
5725 * typedef struct {
5726 * mach_msg_header_t Head;
5727 * NDR_record_t NDR;
5728 * kern_return_t RetCode;
5729 * } mig_reply_error_t;
5730 */
5731
5732 RequestK *InKP = (RequestK *) InHeadP;
5733 RequestU *In0UP = (RequestU *) InDataP;
5734 ReplyK *OutKP = (ReplyK *) OutHeadP;
5735 ReplyU *OutUP = (ReplyU *) OutDataP;
5736 (void)OutUP;
5737#ifdef __MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined
5738 kern_return_t check_result;
5739#endif /* __MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined */
5740
5741#if __MigKernelSpecificCode
5742#else
5743#endif /* __MigKernelSpecificCode */
5744 io_object_t registry_entry;
5745
5746 __DeclareRcvRpc(2843, "io_registry_entry_get_name_in_plane")
5747 __BeforeRcvRpc(2843, "io_registry_entry_get_name_in_plane")
5748
5749#if defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined)
5750 check_result = __MIG_check__Request__io_registry_entry_get_name_in_plane_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5751 if (check_result != MACH_MSG_SUCCESS)
5752 { MIG_RETURN_ERROR(OutKP, check_result); }
5753#endif /* defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined) */
5754
5755 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
5756
5757 OutUP->RetCode = is_io_registry_entry_get_name_in_plane(registry_entry, plane: In0UP->plane, name: OutUP->name);
5758 iokit_remove_reference(obj: registry_entry);
5759 if (OutUP->RetCode != KERN_SUCCESS) {
5760 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
5761 }
5762#if __MigKernelSpecificCode
5763#endif /* __MigKernelSpecificCode */
5764
5765 OutUP->NDR = NDR_record;
5766
5767#ifdef __LP64__
5768 {
5769 size_t strLength = strlen(s: OutUP->name) + 1;
5770 if (strLength > 0xffffffff)
5771 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
5772 OutUP->nameCnt = (mach_msg_type_number_t) strLength;
5773 }
5774#else
5775 OutUP->nameCnt = (mach_msg_type_number_t) strlen(OutUP->name) + 1;
5776#endif /* __LP64__ */
5777 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutUP->nameCnt + 3) & ~3));
5778
5779 __AfterRcvRpc(2843, "io_registry_entry_get_name_in_plane")
5780}
5781
5782#if ( __MigTypeCheck )
5783#if __MIG_check__Request__iokit_subsystem__
5784#if !defined(__MIG_check__Request__io_service_match_property_table_t__defined)
5785#define __MIG_check__Request__io_service_match_property_table_t__defined
5786
5787mig_internal kern_return_t __MIG_check__Request__io_service_match_property_table_t(
5788 __attribute__((__unused__)) __RequestKData__io_service_match_property_table_t *InKP,
5789 __attribute__((__unused__)) __RequestUData__io_service_match_property_table_t *In0UP,
5790 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
5791{
5792
5793 typedef __Request__io_service_match_property_table_t __Request;
5794 typedef __RequestUData__io_service_match_property_table_t __RequestU __attribute__((unused));
5795#if __MigTypeCheck
5796 unsigned int msgh_size;
5797#endif /* __MigTypeCheck */
5798
5799#if __MigTypeCheck
5800 msgh_size = InKP->Head.msgh_size;
5801 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5802 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
5803 return MIG_BAD_ARGUMENTS;
5804#endif /* __MigTypeCheck */
5805
5806#if defined(__NDR_convert__int_rep__Request__io_service_match_property_table_t__matchingCnt__defined)
5807 if (In0UP->NDR.int_rep != NDR_record.int_rep)
5808 __NDR_convert__int_rep__Request__io_service_match_property_table_t__matchingCnt(&In0UP->matchingCnt, In0UP->NDR.int_rep);
5809#endif /* __NDR_convert__int_rep__Request__io_service_match_property_table_t__matchingCnt__defined */
5810#if __MigTypeCheck
5811 if (In0UP->matchingCnt > 512)
5812 return MIG_BAD_ARGUMENTS;
5813 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0UP->matchingCnt) ||
5814 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0UP->matchingCnt)))
5815 return MIG_BAD_ARGUMENTS;
5816#endif /* __MigTypeCheck */
5817
5818#if __MigTypeCheck
5819 {
5820 char * msg_limit = (char *) InTrailerP;
5821#if __MigKernelSpecificCode
5822 size_t strnlen_limit;
5823#else
5824 size_t memchr_limit;
5825#endif /* __MigKernelSpecificCode */
5826
5827#if __MigKernelSpecificCode
5828 strnlen_limit = min((msg_limit - In0UP->matching), 512);
5829 if (( strnlen(s: In0UP->matching, n: strnlen_limit) >= 512 + 1 ))
5830 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5831#else
5832 memchr_limit = min((msg_limit - In0UP->matching), 512);
5833 if (( memchr(In0UP->matching, '\0', memchr_limit) == NULL ))
5834 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
5835#endif /* __MigKernelSpecificCode */
5836 }
5837#endif /* __MigTypeCheck */
5838
5839 return MACH_MSG_SUCCESS;
5840}
5841#endif /* !defined(__MIG_check__Request__io_service_match_property_table_t__defined) */
5842#endif /* __MIG_check__Request__iokit_subsystem__ */
5843#endif /* ( __MigTypeCheck ) */
5844
5845
5846/* Routine io_service_match_property_table */
5847mig_internal novalue _Xio_service_match_property_table
5848 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5849 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5850 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
5851{
5852
5853#ifdef __MigPackStructs
5854#pragma pack(push, 4)
5855#endif
5856 typedef struct {
5857 NDR_record_t NDR;
5858 mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
5859 mach_msg_type_number_t matchingCnt;
5860 char matching[512];
5861 mach_msg_trailer_t trailer;
5862 char padding[0]; /* Avoid generating empty UData structs */
5863 } RequestU __attribute__((unused));
5864#ifdef __MigPackStructs
5865#pragma pack(pop)
5866#endif
5867 typedef __RequestKData__io_service_match_property_table_t RequestK;
5868 typedef __RequestUData__io_service_match_property_table_t __RequestU;
5869 typedef __ReplyKData__io_service_match_property_table_t ReplyK __attribute__((unused));
5870 typedef __ReplyUData__io_service_match_property_table_t ReplyU __attribute__((unused));
5871 typedef __Reply__io_service_match_property_table_t Reply __attribute__((unused));
5872 typedef __Request__io_service_match_property_table_t __Request __attribute__((unused));
5873
5874 /*
5875 * typedef struct {
5876 * mach_msg_header_t Head;
5877 * NDR_record_t NDR;
5878 * kern_return_t RetCode;
5879 * } mig_reply_error_t;
5880 */
5881
5882 RequestK *InKP = (RequestK *) InHeadP;
5883 RequestU *In0UP = (RequestU *) InDataP;
5884 ReplyK *OutKP = (ReplyK *) OutHeadP;
5885 ReplyU *OutUP = (ReplyU *) OutDataP;
5886 (void)OutUP;
5887#ifdef __MIG_check__Request__io_service_match_property_table_t__defined
5888 kern_return_t check_result;
5889#endif /* __MIG_check__Request__io_service_match_property_table_t__defined */
5890
5891#if __MigKernelSpecificCode
5892#else
5893#endif /* __MigKernelSpecificCode */
5894 io_object_t service;
5895
5896 __DeclareRcvRpc(2844, "io_service_match_property_table")
5897 __BeforeRcvRpc(2844, "io_service_match_property_table")
5898
5899#if defined(__MIG_check__Request__io_service_match_property_table_t__defined)
5900 check_result = __MIG_check__Request__io_service_match_property_table_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
5901 if (check_result != MACH_MSG_SUCCESS)
5902 { MIG_RETURN_ERROR(OutKP, check_result); }
5903#endif /* defined(__MIG_check__Request__io_service_match_property_table_t__defined) */
5904
5905 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
5906
5907 OutUP->RetCode = is_io_service_match_property_table(service, matching: In0UP->matching, matches: &OutUP->matches);
5908 iokit_remove_reference(obj: service);
5909 if (OutUP->RetCode != KERN_SUCCESS) {
5910 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
5911 }
5912#if __MigKernelSpecificCode
5913#endif /* __MigKernelSpecificCode */
5914
5915 OutUP->NDR = NDR_record;
5916
5917
5918 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
5919 __AfterRcvRpc(2844, "io_service_match_property_table")
5920}
5921
5922#if ( __MigTypeCheck )
5923#if __MIG_check__Request__iokit_subsystem__
5924#if !defined(__MIG_check__Request__io_async_method_scalarI_scalarO_t__defined)
5925#define __MIG_check__Request__io_async_method_scalarI_scalarO_t__defined
5926
5927mig_internal kern_return_t __MIG_check__Request__io_async_method_scalarI_scalarO_t(
5928 __attribute__((__unused__)) __RequestKData__io_async_method_scalarI_scalarO_t *InKP,
5929 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_scalarO_t *In0UP,
5930 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
5931 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_scalarO_t **In1UPP,
5932 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_scalarO_t **In2UPP)
5933{
5934
5935 typedef __Request__io_async_method_scalarI_scalarO_t __Request;
5936 typedef __RequestUData__io_async_method_scalarI_scalarO_t __RequestU __attribute__((unused));
5937 __RequestU *In1UP;
5938 __RequestU *In2UP;
5939#if __MigTypeCheck
5940 unsigned int msgh_size;
5941#endif /* __MigTypeCheck */
5942 unsigned int msgh_size_delta;
5943
5944#if __MigTypeCheck
5945 msgh_size = InKP->Head.msgh_size;
5946 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
5947 (InKP->msgh_body.msgh_descriptor_count != 1) ||
5948 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 96)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
5949 return MIG_BAD_ARGUMENTS;
5950#endif /* __MigTypeCheck */
5951
5952#if __MigTypeCheck
5953 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
5954 InKP->wake_port.disposition != 17)
5955 return MIG_TYPE_ERROR;
5956#endif /* __MigTypeCheck */
5957
5958#if defined(__NDR_convert__int_rep__Request__io_async_method_scalarI_scalarO_t__referenceCnt__defined)
5959 if (In0UP->NDR.int_rep != NDR_record.int_rep)
5960 __NDR_convert__int_rep__Request__io_async_method_scalarI_scalarO_t__referenceCnt(&In0UP->referenceCnt, In0UP->NDR.int_rep);
5961#endif /* __NDR_convert__int_rep__Request__io_async_method_scalarI_scalarO_t__referenceCnt__defined */
5962 msgh_size_delta = (4 * In0UP->referenceCnt);
5963#if __MigTypeCheck
5964 if (In0UP->referenceCnt > 8)
5965 return MIG_BAD_ARGUMENTS;
5966 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 96)) / 4 < In0UP->referenceCnt) ||
5967 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 96) + (4 * In0UP->referenceCnt)))
5968 return MIG_BAD_ARGUMENTS;
5969 msgh_size -= msgh_size_delta;
5970#endif /* __MigTypeCheck */
5971
5972 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 32);
5973
5974#if defined(__NDR_convert__int_rep__Request__io_async_method_scalarI_scalarO_t__inputCnt__defined)
5975 if (In0UP->NDR.int_rep != NDR_record.int_rep)
5976 __NDR_convert__int_rep__Request__io_async_method_scalarI_scalarO_t__inputCnt(&In1UP->inputCnt, In1UP->NDR.int_rep);
5977#endif /* __NDR_convert__int_rep__Request__io_async_method_scalarI_scalarO_t__inputCnt__defined */
5978 msgh_size_delta = (4 * In1UP->inputCnt);
5979#if __MigTypeCheck
5980 if (In1UP->inputCnt > 16)
5981 return MIG_BAD_ARGUMENTS;
5982 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 96)) / 4 < In1UP->inputCnt) ||
5983 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 96) + (4 * In1UP->inputCnt)))
5984 return MIG_BAD_ARGUMENTS;
5985#endif /* __MigTypeCheck */
5986
5987 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 64);
5988
5989 return MACH_MSG_SUCCESS;
5990}
5991#endif /* !defined(__MIG_check__Request__io_async_method_scalarI_scalarO_t__defined) */
5992#endif /* __MIG_check__Request__iokit_subsystem__ */
5993#endif /* ( __MigTypeCheck ) */
5994
5995
5996/* Routine io_async_method_scalarI_scalarO */
5997mig_internal novalue _Xio_async_method_scalarI_scalarO
5998 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
5999 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6000 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
6001{
6002
6003#ifdef __MigPackStructs
6004#pragma pack(push, 4)
6005#endif
6006 typedef struct {
6007 NDR_record_t NDR;
6008 mach_msg_type_number_t referenceCnt;
6009 natural_t reference[8];
6010 uint32_t selector;
6011 mach_msg_type_number_t inputCnt;
6012 int input[16];
6013 mach_msg_type_number_t outputCnt;
6014 mach_msg_trailer_t trailer;
6015 char padding[0]; /* Avoid generating empty UData structs */
6016 } RequestU __attribute__((unused));
6017#ifdef __MigPackStructs
6018#pragma pack(pop)
6019#endif
6020 typedef __RequestKData__io_async_method_scalarI_scalarO_t RequestK;
6021 typedef __RequestUData__io_async_method_scalarI_scalarO_t __RequestU;
6022 typedef __ReplyKData__io_async_method_scalarI_scalarO_t ReplyK __attribute__((unused));
6023 typedef __ReplyUData__io_async_method_scalarI_scalarO_t ReplyU __attribute__((unused));
6024 typedef __Reply__io_async_method_scalarI_scalarO_t Reply __attribute__((unused));
6025 typedef __Request__io_async_method_scalarI_scalarO_t __Request __attribute__((unused));
6026
6027 /*
6028 * typedef struct {
6029 * mach_msg_header_t Head;
6030 * NDR_record_t NDR;
6031 * kern_return_t RetCode;
6032 * } mig_reply_error_t;
6033 */
6034
6035 RequestK *InKP = (RequestK *) InHeadP;
6036 RequestU *In0UP = (RequestU *) InDataP;
6037 RequestU *In1UP;
6038 RequestU *In2UP;
6039 ReplyK *OutKP = (ReplyK *) OutHeadP;
6040 ReplyU *OutUP = (ReplyU *) OutDataP;
6041 (void)OutUP;
6042#ifdef __MIG_check__Request__io_async_method_scalarI_scalarO_t__defined
6043 kern_return_t check_result;
6044#endif /* __MIG_check__Request__io_async_method_scalarI_scalarO_t__defined */
6045
6046#if __MigKernelSpecificCode
6047#else
6048#endif /* __MigKernelSpecificCode */
6049 io_connect_t connection;
6050
6051 __DeclareRcvRpc(2845, "io_async_method_scalarI_scalarO")
6052 __BeforeRcvRpc(2845, "io_async_method_scalarI_scalarO")
6053
6054#if defined(__MIG_check__Request__io_async_method_scalarI_scalarO_t__defined)
6055 check_result = __MIG_check__Request__io_async_method_scalarI_scalarO_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
6056 if (check_result != MACH_MSG_SUCCESS)
6057 { MIG_RETURN_ERROR(OutKP, check_result); }
6058#endif /* defined(__MIG_check__Request__io_async_method_scalarI_scalarO_t__defined) */
6059
6060 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
6061
6062 OutUP->outputCnt = 16;
6063 if (In2UP->outputCnt < OutUP->outputCnt)
6064 OutUP->outputCnt = In2UP->outputCnt;
6065
6066 OutUP->RetCode = is_io_async_method_scalarI_scalarO(connection, wake_port: InKP->wake_port.name, reference: In0UP->reference, referenceCnt: In0UP->referenceCnt, selector: In1UP->selector, input: In1UP->input, inputCnt: In1UP->inputCnt, output: OutUP->output, outputCnt: &OutUP->outputCnt);
6067 iokit_remove_connect_reference(obj: connection);
6068 if (OutUP->RetCode != KERN_SUCCESS) {
6069 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
6070 }
6071#if __MigKernelSpecificCode
6072#endif /* __MigKernelSpecificCode */
6073
6074 OutUP->NDR = NDR_record;
6075
6076 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 64) + (((4 * OutUP->outputCnt)));
6077
6078 __AfterRcvRpc(2845, "io_async_method_scalarI_scalarO")
6079}
6080
6081#if ( __MigTypeCheck )
6082#if __MIG_check__Request__iokit_subsystem__
6083#if !defined(__MIG_check__Request__io_async_method_scalarI_structureO_t__defined)
6084#define __MIG_check__Request__io_async_method_scalarI_structureO_t__defined
6085
6086mig_internal kern_return_t __MIG_check__Request__io_async_method_scalarI_structureO_t(
6087 __attribute__((__unused__)) __RequestKData__io_async_method_scalarI_structureO_t *InKP,
6088 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_structureO_t *In0UP,
6089 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6090 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_structureO_t **In1UPP,
6091 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_structureO_t **In2UPP)
6092{
6093
6094 typedef __Request__io_async_method_scalarI_structureO_t __Request;
6095 typedef __RequestUData__io_async_method_scalarI_structureO_t __RequestU __attribute__((unused));
6096 __RequestU *In1UP;
6097 __RequestU *In2UP;
6098#if __MigTypeCheck
6099 unsigned int msgh_size;
6100#endif /* __MigTypeCheck */
6101 unsigned int msgh_size_delta;
6102
6103#if __MigTypeCheck
6104 msgh_size = InKP->Head.msgh_size;
6105 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
6106 (InKP->msgh_body.msgh_descriptor_count != 1) ||
6107 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 96)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
6108 return MIG_BAD_ARGUMENTS;
6109#endif /* __MigTypeCheck */
6110
6111#if __MigTypeCheck
6112 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
6113 InKP->wake_port.disposition != 17)
6114 return MIG_TYPE_ERROR;
6115#endif /* __MigTypeCheck */
6116
6117#if defined(__NDR_convert__int_rep__Request__io_async_method_scalarI_structureO_t__referenceCnt__defined)
6118 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6119 __NDR_convert__int_rep__Request__io_async_method_scalarI_structureO_t__referenceCnt(&In0UP->referenceCnt, In0UP->NDR.int_rep);
6120#endif /* __NDR_convert__int_rep__Request__io_async_method_scalarI_structureO_t__referenceCnt__defined */
6121 msgh_size_delta = (4 * In0UP->referenceCnt);
6122#if __MigTypeCheck
6123 if (In0UP->referenceCnt > 8)
6124 return MIG_BAD_ARGUMENTS;
6125 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 96)) / 4 < In0UP->referenceCnt) ||
6126 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 96) + (4 * In0UP->referenceCnt)))
6127 return MIG_BAD_ARGUMENTS;
6128 msgh_size -= msgh_size_delta;
6129#endif /* __MigTypeCheck */
6130
6131 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 32);
6132
6133#if defined(__NDR_convert__int_rep__Request__io_async_method_scalarI_structureO_t__inputCnt__defined)
6134 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6135 __NDR_convert__int_rep__Request__io_async_method_scalarI_structureO_t__inputCnt(&In1UP->inputCnt, In1UP->NDR.int_rep);
6136#endif /* __NDR_convert__int_rep__Request__io_async_method_scalarI_structureO_t__inputCnt__defined */
6137 msgh_size_delta = (4 * In1UP->inputCnt);
6138#if __MigTypeCheck
6139 if (In1UP->inputCnt > 16)
6140 return MIG_BAD_ARGUMENTS;
6141 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 96)) / 4 < In1UP->inputCnt) ||
6142 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 96) + (4 * In1UP->inputCnt)))
6143 return MIG_BAD_ARGUMENTS;
6144#endif /* __MigTypeCheck */
6145
6146 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 64);
6147
6148 return MACH_MSG_SUCCESS;
6149}
6150#endif /* !defined(__MIG_check__Request__io_async_method_scalarI_structureO_t__defined) */
6151#endif /* __MIG_check__Request__iokit_subsystem__ */
6152#endif /* ( __MigTypeCheck ) */
6153
6154
6155/* Routine io_async_method_scalarI_structureO */
6156mig_internal novalue _Xio_async_method_scalarI_structureO
6157 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
6158 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6159 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
6160{
6161
6162#ifdef __MigPackStructs
6163#pragma pack(push, 4)
6164#endif
6165 typedef struct {
6166 NDR_record_t NDR;
6167 mach_msg_type_number_t referenceCnt;
6168 natural_t reference[8];
6169 uint32_t selector;
6170 mach_msg_type_number_t inputCnt;
6171 int input[16];
6172 mach_msg_type_number_t outputCnt;
6173 mach_msg_trailer_t trailer;
6174 char padding[0]; /* Avoid generating empty UData structs */
6175 } RequestU __attribute__((unused));
6176#ifdef __MigPackStructs
6177#pragma pack(pop)
6178#endif
6179 typedef __RequestKData__io_async_method_scalarI_structureO_t RequestK;
6180 typedef __RequestUData__io_async_method_scalarI_structureO_t __RequestU;
6181 typedef __ReplyKData__io_async_method_scalarI_structureO_t ReplyK __attribute__((unused));
6182 typedef __ReplyUData__io_async_method_scalarI_structureO_t ReplyU __attribute__((unused));
6183 typedef __Reply__io_async_method_scalarI_structureO_t Reply __attribute__((unused));
6184 typedef __Request__io_async_method_scalarI_structureO_t __Request __attribute__((unused));
6185
6186 /*
6187 * typedef struct {
6188 * mach_msg_header_t Head;
6189 * NDR_record_t NDR;
6190 * kern_return_t RetCode;
6191 * } mig_reply_error_t;
6192 */
6193
6194 RequestK *InKP = (RequestK *) InHeadP;
6195 RequestU *In0UP = (RequestU *) InDataP;
6196 RequestU *In1UP;
6197 RequestU *In2UP;
6198 ReplyK *OutKP = (ReplyK *) OutHeadP;
6199 ReplyU *OutUP = (ReplyU *) OutDataP;
6200 (void)OutUP;
6201#ifdef __MIG_check__Request__io_async_method_scalarI_structureO_t__defined
6202 kern_return_t check_result;
6203#endif /* __MIG_check__Request__io_async_method_scalarI_structureO_t__defined */
6204
6205#if __MigKernelSpecificCode
6206#else
6207#endif /* __MigKernelSpecificCode */
6208 io_connect_t connection;
6209
6210 __DeclareRcvRpc(2846, "io_async_method_scalarI_structureO")
6211 __BeforeRcvRpc(2846, "io_async_method_scalarI_structureO")
6212
6213#if defined(__MIG_check__Request__io_async_method_scalarI_structureO_t__defined)
6214 check_result = __MIG_check__Request__io_async_method_scalarI_structureO_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
6215 if (check_result != MACH_MSG_SUCCESS)
6216 { MIG_RETURN_ERROR(OutKP, check_result); }
6217#endif /* defined(__MIG_check__Request__io_async_method_scalarI_structureO_t__defined) */
6218
6219 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
6220
6221 OutUP->outputCnt = 4096;
6222 if (In2UP->outputCnt < OutUP->outputCnt)
6223 OutUP->outputCnt = In2UP->outputCnt;
6224
6225 OutUP->RetCode = is_io_async_method_scalarI_structureO(connection, wake_port: InKP->wake_port.name, reference: In0UP->reference, referenceCnt: In0UP->referenceCnt, selector: In1UP->selector, input: In1UP->input, inputCnt: In1UP->inputCnt, output: OutUP->output, outputCnt: &OutUP->outputCnt);
6226 iokit_remove_connect_reference(obj: connection);
6227 if (OutUP->RetCode != KERN_SUCCESS) {
6228 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
6229 }
6230#if __MigKernelSpecificCode
6231#endif /* __MigKernelSpecificCode */
6232
6233 OutUP->NDR = NDR_record;
6234
6235 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + (_WALIGN_((OutUP->outputCnt + 3) & ~3));
6236
6237 __AfterRcvRpc(2846, "io_async_method_scalarI_structureO")
6238}
6239
6240#if ( __MigTypeCheck )
6241#if __MIG_check__Request__iokit_subsystem__
6242#if !defined(__MIG_check__Request__io_async_method_scalarI_structureI_t__defined)
6243#define __MIG_check__Request__io_async_method_scalarI_structureI_t__defined
6244
6245mig_internal kern_return_t __MIG_check__Request__io_async_method_scalarI_structureI_t(
6246 __attribute__((__unused__)) __RequestKData__io_async_method_scalarI_structureI_t *InKP,
6247 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_structureI_t *In0UP,
6248 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6249 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_structureI_t **In1UPP,
6250 __attribute__((__unused__)) __RequestUData__io_async_method_scalarI_structureI_t **In2UPP)
6251{
6252
6253 typedef __Request__io_async_method_scalarI_structureI_t __Request;
6254 typedef __RequestUData__io_async_method_scalarI_structureI_t __RequestU __attribute__((unused));
6255 __RequestU *In1UP;
6256 __RequestU *In2UP;
6257#if __MigTypeCheck
6258 unsigned int msgh_size;
6259#endif /* __MigTypeCheck */
6260 unsigned int msgh_size_delta;
6261
6262#if __MigTypeCheck
6263 msgh_size = InKP->Head.msgh_size;
6264 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
6265 (InKP->msgh_body.msgh_descriptor_count != 1) ||
6266 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4192)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
6267 return MIG_BAD_ARGUMENTS;
6268#endif /* __MigTypeCheck */
6269
6270#if __MigTypeCheck
6271 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
6272 InKP->wake_port.disposition != 17)
6273 return MIG_TYPE_ERROR;
6274#endif /* __MigTypeCheck */
6275
6276#if defined(__NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__referenceCnt__defined)
6277 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6278 __NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__referenceCnt(&In0UP->referenceCnt, In0UP->NDR.int_rep);
6279#endif /* __NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__referenceCnt__defined */
6280 msgh_size_delta = (4 * In0UP->referenceCnt);
6281#if __MigTypeCheck
6282 if (In0UP->referenceCnt > 8)
6283 return MIG_BAD_ARGUMENTS;
6284 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4192)) / 4 < In0UP->referenceCnt) ||
6285 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4192) + (4 * In0UP->referenceCnt)))
6286 return MIG_BAD_ARGUMENTS;
6287 msgh_size -= msgh_size_delta;
6288#endif /* __MigTypeCheck */
6289
6290 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 32);
6291
6292#if defined(__NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__inputCnt__defined)
6293 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6294 __NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__inputCnt(&In1UP->inputCnt, In1UP->NDR.int_rep);
6295#endif /* __NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__inputCnt__defined */
6296 msgh_size_delta = (4 * In1UP->inputCnt);
6297#if __MigTypeCheck
6298 if (In1UP->inputCnt > 16)
6299 return MIG_BAD_ARGUMENTS;
6300 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4192)) / 4 < In1UP->inputCnt) ||
6301 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4192) + (4 * In1UP->inputCnt)))
6302 return MIG_BAD_ARGUMENTS;
6303 msgh_size -= msgh_size_delta;
6304#endif /* __MigTypeCheck */
6305
6306 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 64);
6307
6308#if defined(__NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__inputStructCnt__defined)
6309 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6310 __NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__inputStructCnt(&In2UP->inputStructCnt, In2UP->NDR.int_rep);
6311#endif /* __NDR_convert__int_rep__Request__io_async_method_scalarI_structureI_t__inputStructCnt__defined */
6312#if __MigTypeCheck
6313 if (In2UP->inputStructCnt > 4096)
6314 return MIG_BAD_ARGUMENTS;
6315 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4192)) < In2UP->inputStructCnt) ||
6316 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4192) + _WALIGN_(In2UP->inputStructCnt)))
6317 return MIG_BAD_ARGUMENTS;
6318#endif /* __MigTypeCheck */
6319
6320 return MACH_MSG_SUCCESS;
6321}
6322#endif /* !defined(__MIG_check__Request__io_async_method_scalarI_structureI_t__defined) */
6323#endif /* __MIG_check__Request__iokit_subsystem__ */
6324#endif /* ( __MigTypeCheck ) */
6325
6326
6327/* Routine io_async_method_scalarI_structureI */
6328mig_internal novalue _Xio_async_method_scalarI_structureI
6329 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
6330 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6331 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
6332{
6333
6334#ifdef __MigPackStructs
6335#pragma pack(push, 4)
6336#endif
6337 typedef struct {
6338 NDR_record_t NDR;
6339 mach_msg_type_number_t referenceCnt;
6340 natural_t reference[8];
6341 uint32_t selector;
6342 mach_msg_type_number_t inputCnt;
6343 int input[16];
6344 mach_msg_type_number_t inputStructCnt;
6345 char inputStruct[4096];
6346 mach_msg_trailer_t trailer;
6347 char padding[0]; /* Avoid generating empty UData structs */
6348 } RequestU __attribute__((unused));
6349#ifdef __MigPackStructs
6350#pragma pack(pop)
6351#endif
6352 typedef __RequestKData__io_async_method_scalarI_structureI_t RequestK;
6353 typedef __RequestUData__io_async_method_scalarI_structureI_t __RequestU;
6354 typedef __ReplyKData__io_async_method_scalarI_structureI_t ReplyK __attribute__((unused));
6355 typedef __ReplyUData__io_async_method_scalarI_structureI_t ReplyU __attribute__((unused));
6356 typedef __Reply__io_async_method_scalarI_structureI_t Reply __attribute__((unused));
6357 typedef __Request__io_async_method_scalarI_structureI_t __Request __attribute__((unused));
6358
6359 /*
6360 * typedef struct {
6361 * mach_msg_header_t Head;
6362 * NDR_record_t NDR;
6363 * kern_return_t RetCode;
6364 * } mig_reply_error_t;
6365 */
6366
6367 RequestK *InKP = (RequestK *) InHeadP;
6368 RequestU *In0UP = (RequestU *) InDataP;
6369 RequestU *In1UP;
6370 RequestU *In2UP;
6371 ReplyK *OutKP = (ReplyK *) OutHeadP;
6372 ReplyU *OutUP = (ReplyU *) OutDataP;
6373 (void)OutUP;
6374#ifdef __MIG_check__Request__io_async_method_scalarI_structureI_t__defined
6375 kern_return_t check_result;
6376#endif /* __MIG_check__Request__io_async_method_scalarI_structureI_t__defined */
6377
6378#if __MigKernelSpecificCode
6379#else
6380#endif /* __MigKernelSpecificCode */
6381 io_connect_t connection;
6382
6383 __DeclareRcvRpc(2847, "io_async_method_scalarI_structureI")
6384 __BeforeRcvRpc(2847, "io_async_method_scalarI_structureI")
6385
6386#if defined(__MIG_check__Request__io_async_method_scalarI_structureI_t__defined)
6387 check_result = __MIG_check__Request__io_async_method_scalarI_structureI_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
6388 if (check_result != MACH_MSG_SUCCESS)
6389 { MIG_RETURN_ERROR(OutKP, check_result); }
6390#endif /* defined(__MIG_check__Request__io_async_method_scalarI_structureI_t__defined) */
6391
6392 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
6393
6394 OutUP->RetCode = is_io_async_method_scalarI_structureI(connection, wake_port: InKP->wake_port.name, reference: In0UP->reference, referenceCnt: In0UP->referenceCnt, selector: In1UP->selector, input: In1UP->input, inputCnt: In1UP->inputCnt, inputStruct: In2UP->inputStruct, inputStructCnt: In2UP->inputStructCnt);
6395 iokit_remove_connect_reference(obj: connection);
6396#if __MigKernelSpecificCode
6397#endif /* __MigKernelSpecificCode */
6398
6399 OutUP->NDR = NDR_record;
6400
6401
6402 __AfterRcvRpc(2847, "io_async_method_scalarI_structureI")
6403}
6404
6405#if ( __MigTypeCheck )
6406#if __MIG_check__Request__iokit_subsystem__
6407#if !defined(__MIG_check__Request__io_async_method_structureI_structureO_t__defined)
6408#define __MIG_check__Request__io_async_method_structureI_structureO_t__defined
6409
6410mig_internal kern_return_t __MIG_check__Request__io_async_method_structureI_structureO_t(
6411 __attribute__((__unused__)) __RequestKData__io_async_method_structureI_structureO_t *InKP,
6412 __attribute__((__unused__)) __RequestUData__io_async_method_structureI_structureO_t *In0UP,
6413 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6414 __attribute__((__unused__)) __RequestUData__io_async_method_structureI_structureO_t **In1UPP,
6415 __attribute__((__unused__)) __RequestUData__io_async_method_structureI_structureO_t **In2UPP)
6416{
6417
6418 typedef __Request__io_async_method_structureI_structureO_t __Request;
6419 typedef __RequestUData__io_async_method_structureI_structureO_t __RequestU __attribute__((unused));
6420 __RequestU *In1UP;
6421 __RequestU *In2UP;
6422#if __MigTypeCheck
6423 unsigned int msgh_size;
6424#endif /* __MigTypeCheck */
6425 unsigned int msgh_size_delta;
6426
6427#if __MigTypeCheck
6428 msgh_size = InKP->Head.msgh_size;
6429 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
6430 (InKP->msgh_body.msgh_descriptor_count != 1) ||
6431 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
6432 return MIG_BAD_ARGUMENTS;
6433#endif /* __MigTypeCheck */
6434
6435#if __MigTypeCheck
6436 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
6437 InKP->wake_port.disposition != 17)
6438 return MIG_TYPE_ERROR;
6439#endif /* __MigTypeCheck */
6440
6441#if defined(__NDR_convert__int_rep__Request__io_async_method_structureI_structureO_t__referenceCnt__defined)
6442 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6443 __NDR_convert__int_rep__Request__io_async_method_structureI_structureO_t__referenceCnt(&In0UP->referenceCnt, In0UP->NDR.int_rep);
6444#endif /* __NDR_convert__int_rep__Request__io_async_method_structureI_structureO_t__referenceCnt__defined */
6445 msgh_size_delta = (4 * In0UP->referenceCnt);
6446#if __MigTypeCheck
6447 if (In0UP->referenceCnt > 8)
6448 return MIG_BAD_ARGUMENTS;
6449 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4128)) / 4 < In0UP->referenceCnt) ||
6450 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4128) + (4 * In0UP->referenceCnt)))
6451 return MIG_BAD_ARGUMENTS;
6452 msgh_size -= msgh_size_delta;
6453#endif /* __MigTypeCheck */
6454
6455 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 32);
6456
6457#if defined(__NDR_convert__int_rep__Request__io_async_method_structureI_structureO_t__inputCnt__defined)
6458 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6459 __NDR_convert__int_rep__Request__io_async_method_structureI_structureO_t__inputCnt(&In1UP->inputCnt, In1UP->NDR.int_rep);
6460#endif /* __NDR_convert__int_rep__Request__io_async_method_structureI_structureO_t__inputCnt__defined */
6461 msgh_size_delta = _WALIGN_(In1UP->inputCnt);
6462#if __MigTypeCheck
6463 if (In1UP->inputCnt > 4096)
6464 return MIG_BAD_ARGUMENTS;
6465 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4128)) < In1UP->inputCnt) ||
6466 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4128) + _WALIGN_(In1UP->inputCnt)))
6467 return MIG_BAD_ARGUMENTS;
6468#endif /* __MigTypeCheck */
6469
6470 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 4096);
6471
6472 return MACH_MSG_SUCCESS;
6473}
6474#endif /* !defined(__MIG_check__Request__io_async_method_structureI_structureO_t__defined) */
6475#endif /* __MIG_check__Request__iokit_subsystem__ */
6476#endif /* ( __MigTypeCheck ) */
6477
6478
6479/* Routine io_async_method_structureI_structureO */
6480mig_internal novalue _Xio_async_method_structureI_structureO
6481 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
6482 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6483 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
6484{
6485
6486#ifdef __MigPackStructs
6487#pragma pack(push, 4)
6488#endif
6489 typedef struct {
6490 NDR_record_t NDR;
6491 mach_msg_type_number_t referenceCnt;
6492 natural_t reference[8];
6493 uint32_t selector;
6494 mach_msg_type_number_t inputCnt;
6495 char input[4096];
6496 mach_msg_type_number_t outputCnt;
6497 mach_msg_trailer_t trailer;
6498 char padding[0]; /* Avoid generating empty UData structs */
6499 } RequestU __attribute__((unused));
6500#ifdef __MigPackStructs
6501#pragma pack(pop)
6502#endif
6503 typedef __RequestKData__io_async_method_structureI_structureO_t RequestK;
6504 typedef __RequestUData__io_async_method_structureI_structureO_t __RequestU;
6505 typedef __ReplyKData__io_async_method_structureI_structureO_t ReplyK __attribute__((unused));
6506 typedef __ReplyUData__io_async_method_structureI_structureO_t ReplyU __attribute__((unused));
6507 typedef __Reply__io_async_method_structureI_structureO_t Reply __attribute__((unused));
6508 typedef __Request__io_async_method_structureI_structureO_t __Request __attribute__((unused));
6509
6510 /*
6511 * typedef struct {
6512 * mach_msg_header_t Head;
6513 * NDR_record_t NDR;
6514 * kern_return_t RetCode;
6515 * } mig_reply_error_t;
6516 */
6517
6518 RequestK *InKP = (RequestK *) InHeadP;
6519 RequestU *In0UP = (RequestU *) InDataP;
6520 RequestU *In1UP;
6521 RequestU *In2UP;
6522 ReplyK *OutKP = (ReplyK *) OutHeadP;
6523 ReplyU *OutUP = (ReplyU *) OutDataP;
6524 (void)OutUP;
6525#ifdef __MIG_check__Request__io_async_method_structureI_structureO_t__defined
6526 kern_return_t check_result;
6527#endif /* __MIG_check__Request__io_async_method_structureI_structureO_t__defined */
6528
6529#if __MigKernelSpecificCode
6530#else
6531#endif /* __MigKernelSpecificCode */
6532 io_connect_t connection;
6533
6534 __DeclareRcvRpc(2848, "io_async_method_structureI_structureO")
6535 __BeforeRcvRpc(2848, "io_async_method_structureI_structureO")
6536
6537#if defined(__MIG_check__Request__io_async_method_structureI_structureO_t__defined)
6538 check_result = __MIG_check__Request__io_async_method_structureI_structureO_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
6539 if (check_result != MACH_MSG_SUCCESS)
6540 { MIG_RETURN_ERROR(OutKP, check_result); }
6541#endif /* defined(__MIG_check__Request__io_async_method_structureI_structureO_t__defined) */
6542
6543 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
6544
6545 OutUP->outputCnt = 4096;
6546 if (In2UP->outputCnt < OutUP->outputCnt)
6547 OutUP->outputCnt = In2UP->outputCnt;
6548
6549 OutUP->RetCode = is_io_async_method_structureI_structureO(connection, wake_port: InKP->wake_port.name, reference: In0UP->reference, referenceCnt: In0UP->referenceCnt, selector: In1UP->selector, input: In1UP->input, inputCnt: In1UP->inputCnt, output: OutUP->output, outputCnt: &OutUP->outputCnt);
6550 iokit_remove_connect_reference(obj: connection);
6551 if (OutUP->RetCode != KERN_SUCCESS) {
6552 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
6553 }
6554#if __MigKernelSpecificCode
6555#endif /* __MigKernelSpecificCode */
6556
6557 OutUP->NDR = NDR_record;
6558
6559 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + (_WALIGN_((OutUP->outputCnt + 3) & ~3));
6560
6561 __AfterRcvRpc(2848, "io_async_method_structureI_structureO")
6562}
6563
6564#if ( __MigTypeCheck )
6565#if __MIG_check__Request__iokit_subsystem__
6566#if !defined(__MIG_check__Request__io_service_add_notification_t__defined)
6567#define __MIG_check__Request__io_service_add_notification_t__defined
6568
6569mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_t(
6570 __attribute__((__unused__)) __RequestKData__io_service_add_notification_t *InKP,
6571 __attribute__((__unused__)) __RequestUData__io_service_add_notification_t *In0UP,
6572 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6573 __attribute__((__unused__)) __RequestUData__io_service_add_notification_t **In1UPP,
6574 __attribute__((__unused__)) __RequestUData__io_service_add_notification_t **In2UPP)
6575{
6576
6577 typedef __Request__io_service_add_notification_t __Request;
6578 typedef __RequestUData__io_service_add_notification_t __RequestU __attribute__((unused));
6579 __RequestU *In1UP;
6580 __RequestU *In2UP;
6581#if __MigTypeCheck
6582 unsigned int msgh_size;
6583#endif /* __MigTypeCheck */
6584 unsigned int msgh_size_delta;
6585
6586#if __MigTypeCheck
6587 msgh_size = InKP->Head.msgh_size;
6588 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
6589 (InKP->msgh_body.msgh_descriptor_count != 1) ||
6590 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 672)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
6591 return MIG_BAD_ARGUMENTS;
6592#endif /* __MigTypeCheck */
6593
6594#if __MigTypeCheck
6595 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
6596 InKP->wake_port.disposition != 17)
6597 return MIG_TYPE_ERROR;
6598#endif /* __MigTypeCheck */
6599
6600#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_t__notification_typeCnt__defined)
6601 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6602 __NDR_convert__int_rep__Request__io_service_add_notification_t__notification_typeCnt(&In0UP->notification_typeCnt, In0UP->NDR.int_rep);
6603#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_t__notification_typeCnt__defined */
6604 msgh_size_delta = _WALIGN_(In0UP->notification_typeCnt);
6605#if __MigTypeCheck
6606 if (In0UP->notification_typeCnt > 128)
6607 return MIG_BAD_ARGUMENTS;
6608 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 672)) < In0UP->notification_typeCnt) ||
6609 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 672) + _WALIGN_(In0UP->notification_typeCnt)))
6610 return MIG_BAD_ARGUMENTS;
6611 msgh_size -= msgh_size_delta;
6612#endif /* __MigTypeCheck */
6613
6614 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
6615
6616#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_t__matchingCnt__defined)
6617 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6618 __NDR_convert__int_rep__Request__io_service_add_notification_t__matchingCnt(&In1UP->matchingCnt, In1UP->NDR.int_rep);
6619#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_t__matchingCnt__defined */
6620 msgh_size_delta = _WALIGN_(In1UP->matchingCnt);
6621#if __MigTypeCheck
6622 if (In1UP->matchingCnt > 512)
6623 return MIG_BAD_ARGUMENTS;
6624 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 672)) < In1UP->matchingCnt) ||
6625 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 672) + _WALIGN_(In1UP->matchingCnt)))
6626 return MIG_BAD_ARGUMENTS;
6627 msgh_size -= msgh_size_delta;
6628#endif /* __MigTypeCheck */
6629
6630 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 512);
6631
6632#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_t__referenceCnt__defined)
6633 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6634 __NDR_convert__int_rep__Request__io_service_add_notification_t__referenceCnt(&In2UP->referenceCnt, In2UP->NDR.int_rep);
6635#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_t__referenceCnt__defined */
6636#if __MigTypeCheck
6637 if (In2UP->referenceCnt > 8)
6638 return MIG_BAD_ARGUMENTS;
6639 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 672)) / 4 < In2UP->referenceCnt) ||
6640 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 672) + (4 * In2UP->referenceCnt)))
6641 return MIG_BAD_ARGUMENTS;
6642#endif /* __MigTypeCheck */
6643
6644#if __MigTypeCheck
6645 {
6646 char * msg_limit = (char *) InTrailerP;
6647#if __MigKernelSpecificCode
6648 size_t strnlen_limit;
6649#else
6650 size_t memchr_limit;
6651#endif /* __MigKernelSpecificCode */
6652
6653#if __MigKernelSpecificCode
6654 strnlen_limit = min((msg_limit - In0UP->notification_type), 128);
6655 if (( strnlen(s: In0UP->notification_type, n: strnlen_limit) >= 128 + 1 ))
6656 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
6657#else
6658 memchr_limit = min((msg_limit - In0UP->notification_type), 128);
6659 if (( memchr(In0UP->notification_type, '\0', memchr_limit) == NULL ))
6660 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
6661#endif /* __MigKernelSpecificCode */
6662#if __MigKernelSpecificCode
6663 strnlen_limit = min((msg_limit - In1UP->matching), 512);
6664 if (( strnlen(s: In1UP->matching, n: strnlen_limit) >= 512 + 1 ))
6665 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
6666#else
6667 memchr_limit = min((msg_limit - In1UP->matching), 512);
6668 if (( memchr(In1UP->matching, '\0', memchr_limit) == NULL ))
6669 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
6670#endif /* __MigKernelSpecificCode */
6671 }
6672#endif /* __MigTypeCheck */
6673
6674 return MACH_MSG_SUCCESS;
6675}
6676#endif /* !defined(__MIG_check__Request__io_service_add_notification_t__defined) */
6677#endif /* __MIG_check__Request__iokit_subsystem__ */
6678#endif /* ( __MigTypeCheck ) */
6679
6680
6681/* Routine io_service_add_notification */
6682mig_internal novalue _Xio_service_add_notification
6683 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
6684 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6685 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
6686{
6687
6688#ifdef __MigPackStructs
6689#pragma pack(push, 4)
6690#endif
6691 typedef struct {
6692 NDR_record_t NDR;
6693 mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
6694 mach_msg_type_number_t notification_typeCnt;
6695 char notification_type[128];
6696 mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
6697 mach_msg_type_number_t matchingCnt;
6698 char matching[512];
6699 mach_msg_type_number_t referenceCnt;
6700 natural_t reference[8];
6701 mach_msg_trailer_t trailer;
6702 char padding[0]; /* Avoid generating empty UData structs */
6703 } RequestU __attribute__((unused));
6704#ifdef __MigPackStructs
6705#pragma pack(pop)
6706#endif
6707 typedef __RequestKData__io_service_add_notification_t RequestK;
6708 typedef __RequestUData__io_service_add_notification_t __RequestU;
6709 typedef __ReplyKData__io_service_add_notification_t ReplyK __attribute__((unused));
6710 typedef __ReplyUData__io_service_add_notification_t ReplyU __attribute__((unused));
6711 typedef __Reply__io_service_add_notification_t Reply __attribute__((unused));
6712 typedef __Request__io_service_add_notification_t __Request __attribute__((unused));
6713
6714 /*
6715 * typedef struct {
6716 * mach_msg_header_t Head;
6717 * NDR_record_t NDR;
6718 * kern_return_t RetCode;
6719 * } mig_reply_error_t;
6720 */
6721
6722 RequestK *InKP = (RequestK *) InHeadP;
6723 RequestU *In0UP = (RequestU *) InDataP;
6724 RequestU *In1UP;
6725 RequestU *In2UP;
6726 ReplyK *OutKP = (ReplyK *) OutHeadP;
6727 ReplyU *OutUP = (ReplyU *) OutDataP;
6728 (void)OutUP;
6729#ifdef __MIG_check__Request__io_service_add_notification_t__defined
6730 kern_return_t check_result;
6731#endif /* __MIG_check__Request__io_service_add_notification_t__defined */
6732
6733#if __MigKernelSpecificCode
6734#if UseStaticTemplates
6735 const static mach_msg_port_descriptor_t notificationTemplate = {
6736 /* name = */ MACH_PORT_NULL,
6737 /* pad1 = */ 0,
6738 /* pad2 = */ 0,
6739 /* disp = */ 17,
6740 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
6741 };
6742#endif /* UseStaticTemplates */
6743
6744#else
6745#if UseStaticTemplates
6746 const static mach_msg_port_descriptor_t notificationTemplate = {
6747 /* name = */ MACH_PORT_NULL,
6748 /* pad1 = */ 0,
6749 /* pad2 = */ 0,
6750 /* disp = */ 19,
6751 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
6752 };
6753#endif /* UseStaticTemplates */
6754
6755#endif /* __MigKernelSpecificCode */
6756 kern_return_t RetCode;
6757 io_object_t notification;
6758
6759 __DeclareRcvRpc(2849, "io_service_add_notification")
6760 __BeforeRcvRpc(2849, "io_service_add_notification")
6761
6762#if defined(__MIG_check__Request__io_service_add_notification_t__defined)
6763 check_result = __MIG_check__Request__io_service_add_notification_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
6764 if (check_result != MACH_MSG_SUCCESS)
6765 { MIG_RETURN_ERROR(OutKP, check_result); }
6766#endif /* defined(__MIG_check__Request__io_service_add_notification_t__defined) */
6767
6768#if UseStaticTemplates
6769 OutKP->notification = notificationTemplate;
6770#else /* UseStaticTemplates */
6771#if __MigKernelSpecificCode
6772 OutKP->notification.disposition = 17;
6773#else
6774 OutKP->notification.disposition = 19;
6775#endif /* __MigKernelSpecificCode */
6776#if !(defined(KERNEL) && defined(__LP64__))
6777 OutKP->notification.pad1 = 0;
6778#endif
6779 OutKP->notification.pad2 = 0;
6780 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
6781#if defined(KERNEL)
6782 OutKP->notification.pad_end = 0;
6783#endif
6784#endif /* UseStaticTemplates */
6785
6786
6787 RetCode = is_io_service_add_notification(main_port: InKP->Head.msgh_request_port, notification_type: In0UP->notification_type, matching: In1UP->matching, wake_port: InKP->wake_port.name, reference: In2UP->reference, referenceCnt: In2UP->referenceCnt, notification: &notification);
6788 if (RetCode != KERN_SUCCESS) {
6789 MIG_RETURN_ERROR(OutKP, RetCode);
6790 }
6791#if __MigKernelSpecificCode
6792#endif /* __MigKernelSpecificCode */
6793 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
6794
6795
6796 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
6797 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
6798 OutKP->msgh_body.msgh_descriptor_count = 1;
6799 __AfterRcvRpc(2849, "io_service_add_notification")
6800}
6801
6802#if ( __MigTypeCheck )
6803#if __MIG_check__Request__iokit_subsystem__
6804#if !defined(__MIG_check__Request__io_service_add_interest_notification_t__defined)
6805#define __MIG_check__Request__io_service_add_interest_notification_t__defined
6806
6807mig_internal kern_return_t __MIG_check__Request__io_service_add_interest_notification_t(
6808 __attribute__((__unused__)) __RequestKData__io_service_add_interest_notification_t *InKP,
6809 __attribute__((__unused__)) __RequestUData__io_service_add_interest_notification_t *In0UP,
6810 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6811 __attribute__((__unused__)) __RequestUData__io_service_add_interest_notification_t **In1UPP)
6812{
6813
6814 typedef __Request__io_service_add_interest_notification_t __Request;
6815 typedef __RequestUData__io_service_add_interest_notification_t __RequestU __attribute__((unused));
6816 __RequestU *In1UP;
6817#if __MigTypeCheck
6818 unsigned int msgh_size;
6819#endif /* __MigTypeCheck */
6820 unsigned int msgh_size_delta;
6821
6822#if __MigTypeCheck
6823 msgh_size = InKP->Head.msgh_size;
6824 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
6825 (InKP->msgh_body.msgh_descriptor_count != 1) ||
6826 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 160)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
6827 return MIG_BAD_ARGUMENTS;
6828#endif /* __MigTypeCheck */
6829
6830#if __MigTypeCheck
6831 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
6832 InKP->wake_port.disposition != 17)
6833 return MIG_TYPE_ERROR;
6834#endif /* __MigTypeCheck */
6835
6836#if defined(__NDR_convert__int_rep__Request__io_service_add_interest_notification_t__type_of_interestCnt__defined)
6837 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6838 __NDR_convert__int_rep__Request__io_service_add_interest_notification_t__type_of_interestCnt(&In0UP->type_of_interestCnt, In0UP->NDR.int_rep);
6839#endif /* __NDR_convert__int_rep__Request__io_service_add_interest_notification_t__type_of_interestCnt__defined */
6840 msgh_size_delta = _WALIGN_(In0UP->type_of_interestCnt);
6841#if __MigTypeCheck
6842 if (In0UP->type_of_interestCnt > 128)
6843 return MIG_BAD_ARGUMENTS;
6844 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 160)) < In0UP->type_of_interestCnt) ||
6845 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 160) + _WALIGN_(In0UP->type_of_interestCnt)))
6846 return MIG_BAD_ARGUMENTS;
6847 msgh_size -= msgh_size_delta;
6848#endif /* __MigTypeCheck */
6849
6850 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
6851
6852#if defined(__NDR_convert__int_rep__Request__io_service_add_interest_notification_t__referenceCnt__defined)
6853 if (In0UP->NDR.int_rep != NDR_record.int_rep)
6854 __NDR_convert__int_rep__Request__io_service_add_interest_notification_t__referenceCnt(&In1UP->referenceCnt, In1UP->NDR.int_rep);
6855#endif /* __NDR_convert__int_rep__Request__io_service_add_interest_notification_t__referenceCnt__defined */
6856#if __MigTypeCheck
6857 if (In1UP->referenceCnt > 8)
6858 return MIG_BAD_ARGUMENTS;
6859 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 160)) / 4 < In1UP->referenceCnt) ||
6860 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 160) + (4 * In1UP->referenceCnt)))
6861 return MIG_BAD_ARGUMENTS;
6862#endif /* __MigTypeCheck */
6863
6864#if __MigTypeCheck
6865 {
6866 char * msg_limit = (char *) InTrailerP;
6867#if __MigKernelSpecificCode
6868 size_t strnlen_limit;
6869#else
6870 size_t memchr_limit;
6871#endif /* __MigKernelSpecificCode */
6872
6873#if __MigKernelSpecificCode
6874 strnlen_limit = min((msg_limit - In0UP->type_of_interest), 128);
6875 if (( strnlen(s: In0UP->type_of_interest, n: strnlen_limit) >= 128 + 1 ))
6876 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
6877#else
6878 memchr_limit = min((msg_limit - In0UP->type_of_interest), 128);
6879 if (( memchr(In0UP->type_of_interest, '\0', memchr_limit) == NULL ))
6880 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
6881#endif /* __MigKernelSpecificCode */
6882 }
6883#endif /* __MigTypeCheck */
6884
6885 return MACH_MSG_SUCCESS;
6886}
6887#endif /* !defined(__MIG_check__Request__io_service_add_interest_notification_t__defined) */
6888#endif /* __MIG_check__Request__iokit_subsystem__ */
6889#endif /* ( __MigTypeCheck ) */
6890
6891
6892/* Routine io_service_add_interest_notification */
6893mig_internal novalue _Xio_service_add_interest_notification
6894 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
6895 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
6896 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
6897{
6898
6899#ifdef __MigPackStructs
6900#pragma pack(push, 4)
6901#endif
6902 typedef struct {
6903 NDR_record_t NDR;
6904 mach_msg_type_number_t type_of_interestOffset; /* MiG doesn't use it */
6905 mach_msg_type_number_t type_of_interestCnt;
6906 char type_of_interest[128];
6907 mach_msg_type_number_t referenceCnt;
6908 natural_t reference[8];
6909 mach_msg_trailer_t trailer;
6910 char padding[0]; /* Avoid generating empty UData structs */
6911 } RequestU __attribute__((unused));
6912#ifdef __MigPackStructs
6913#pragma pack(pop)
6914#endif
6915 typedef __RequestKData__io_service_add_interest_notification_t RequestK;
6916 typedef __RequestUData__io_service_add_interest_notification_t __RequestU;
6917 typedef __ReplyKData__io_service_add_interest_notification_t ReplyK __attribute__((unused));
6918 typedef __ReplyUData__io_service_add_interest_notification_t ReplyU __attribute__((unused));
6919 typedef __Reply__io_service_add_interest_notification_t Reply __attribute__((unused));
6920 typedef __Request__io_service_add_interest_notification_t __Request __attribute__((unused));
6921
6922 /*
6923 * typedef struct {
6924 * mach_msg_header_t Head;
6925 * NDR_record_t NDR;
6926 * kern_return_t RetCode;
6927 * } mig_reply_error_t;
6928 */
6929
6930 RequestK *InKP = (RequestK *) InHeadP;
6931 RequestU *In0UP = (RequestU *) InDataP;
6932 RequestU *In1UP;
6933 ReplyK *OutKP = (ReplyK *) OutHeadP;
6934 ReplyU *OutUP = (ReplyU *) OutDataP;
6935 (void)OutUP;
6936#ifdef __MIG_check__Request__io_service_add_interest_notification_t__defined
6937 kern_return_t check_result;
6938#endif /* __MIG_check__Request__io_service_add_interest_notification_t__defined */
6939
6940#if __MigKernelSpecificCode
6941#if UseStaticTemplates
6942 const static mach_msg_port_descriptor_t notificationTemplate = {
6943 /* name = */ MACH_PORT_NULL,
6944 /* pad1 = */ 0,
6945 /* pad2 = */ 0,
6946 /* disp = */ 17,
6947 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
6948 };
6949#endif /* UseStaticTemplates */
6950
6951#else
6952#if UseStaticTemplates
6953 const static mach_msg_port_descriptor_t notificationTemplate = {
6954 /* name = */ MACH_PORT_NULL,
6955 /* pad1 = */ 0,
6956 /* pad2 = */ 0,
6957 /* disp = */ 19,
6958 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
6959 };
6960#endif /* UseStaticTemplates */
6961
6962#endif /* __MigKernelSpecificCode */
6963 kern_return_t RetCode;
6964 io_object_t service;
6965 io_object_t notification;
6966
6967 __DeclareRcvRpc(2850, "io_service_add_interest_notification")
6968 __BeforeRcvRpc(2850, "io_service_add_interest_notification")
6969
6970#if defined(__MIG_check__Request__io_service_add_interest_notification_t__defined)
6971 check_result = __MIG_check__Request__io_service_add_interest_notification_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
6972 if (check_result != MACH_MSG_SUCCESS)
6973 { MIG_RETURN_ERROR(OutKP, check_result); }
6974#endif /* defined(__MIG_check__Request__io_service_add_interest_notification_t__defined) */
6975
6976#if UseStaticTemplates
6977 OutKP->notification = notificationTemplate;
6978#else /* UseStaticTemplates */
6979#if __MigKernelSpecificCode
6980 OutKP->notification.disposition = 17;
6981#else
6982 OutKP->notification.disposition = 19;
6983#endif /* __MigKernelSpecificCode */
6984#if !(defined(KERNEL) && defined(__LP64__))
6985 OutKP->notification.pad1 = 0;
6986#endif
6987 OutKP->notification.pad2 = 0;
6988 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
6989#if defined(KERNEL)
6990 OutKP->notification.pad_end = 0;
6991#endif
6992#endif /* UseStaticTemplates */
6993
6994
6995 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
6996
6997 RetCode = is_io_service_add_interest_notification(service, type_of_interest: In0UP->type_of_interest, wake_port: InKP->wake_port.name, reference: In1UP->reference, referenceCnt: In1UP->referenceCnt, notification: &notification);
6998 iokit_remove_reference(obj: service);
6999 if (RetCode != KERN_SUCCESS) {
7000 MIG_RETURN_ERROR(OutKP, RetCode);
7001 }
7002#if __MigKernelSpecificCode
7003#endif /* __MigKernelSpecificCode */
7004 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
7005
7006
7007 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
7008 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
7009 OutKP->msgh_body.msgh_descriptor_count = 1;
7010 __AfterRcvRpc(2850, "io_service_add_interest_notification")
7011}
7012
7013#if ( __MigTypeCheck )
7014#if __MIG_check__Request__iokit_subsystem__
7015#if !defined(__MIG_check__Request__io_service_acknowledge_notification_t__defined)
7016#define __MIG_check__Request__io_service_acknowledge_notification_t__defined
7017
7018mig_internal kern_return_t __MIG_check__Request__io_service_acknowledge_notification_t(
7019 __attribute__((__unused__)) __RequestKData__io_service_acknowledge_notification_t *InKP,
7020 __attribute__((__unused__)) __RequestUData__io_service_acknowledge_notification_t *In0UP,
7021 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
7022{
7023
7024 typedef __Request__io_service_acknowledge_notification_t __Request;
7025 typedef __RequestUData__io_service_acknowledge_notification_t __RequestU __attribute__((unused));
7026#if __MigTypeCheck
7027 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7028 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
7029 return MIG_BAD_ARGUMENTS;
7030#endif /* __MigTypeCheck */
7031
7032 return MACH_MSG_SUCCESS;
7033}
7034#endif /* !defined(__MIG_check__Request__io_service_acknowledge_notification_t__defined) */
7035#endif /* __MIG_check__Request__iokit_subsystem__ */
7036#endif /* ( __MigTypeCheck ) */
7037
7038
7039/* Routine io_service_acknowledge_notification */
7040mig_internal novalue _Xio_service_acknowledge_notification
7041 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
7042 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7043 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
7044{
7045
7046#ifdef __MigPackStructs
7047#pragma pack(push, 4)
7048#endif
7049 typedef struct {
7050 NDR_record_t NDR;
7051 natural_t notify_ref;
7052 natural_t response;
7053 mach_msg_trailer_t trailer;
7054 char padding[0]; /* Avoid generating empty UData structs */
7055 } RequestU __attribute__((unused));
7056#ifdef __MigPackStructs
7057#pragma pack(pop)
7058#endif
7059 typedef __RequestKData__io_service_acknowledge_notification_t RequestK;
7060 typedef __RequestUData__io_service_acknowledge_notification_t __RequestU;
7061 typedef __ReplyKData__io_service_acknowledge_notification_t ReplyK __attribute__((unused));
7062 typedef __ReplyUData__io_service_acknowledge_notification_t ReplyU __attribute__((unused));
7063 typedef __Reply__io_service_acknowledge_notification_t Reply __attribute__((unused));
7064 typedef __Request__io_service_acknowledge_notification_t __Request __attribute__((unused));
7065
7066 /*
7067 * typedef struct {
7068 * mach_msg_header_t Head;
7069 * NDR_record_t NDR;
7070 * kern_return_t RetCode;
7071 * } mig_reply_error_t;
7072 */
7073
7074 RequestK *InKP = (RequestK *) InHeadP;
7075 RequestU *In0UP = (RequestU *) InDataP;
7076 ReplyK *OutKP = (ReplyK *) OutHeadP;
7077 ReplyU *OutUP = (ReplyU *) OutDataP;
7078 (void)OutUP;
7079#ifdef __MIG_check__Request__io_service_acknowledge_notification_t__defined
7080 kern_return_t check_result;
7081#endif /* __MIG_check__Request__io_service_acknowledge_notification_t__defined */
7082
7083#if __MigKernelSpecificCode
7084#else
7085#endif /* __MigKernelSpecificCode */
7086 io_object_t service;
7087
7088 __DeclareRcvRpc(2851, "io_service_acknowledge_notification")
7089 __BeforeRcvRpc(2851, "io_service_acknowledge_notification")
7090
7091#if defined(__MIG_check__Request__io_service_acknowledge_notification_t__defined)
7092 check_result = __MIG_check__Request__io_service_acknowledge_notification_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
7093 if (check_result != MACH_MSG_SUCCESS)
7094 { MIG_RETURN_ERROR(OutKP, check_result); }
7095#endif /* defined(__MIG_check__Request__io_service_acknowledge_notification_t__defined) */
7096
7097 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
7098
7099 OutUP->RetCode = is_io_service_acknowledge_notification(service, notify_ref: In0UP->notify_ref, response: In0UP->response);
7100 iokit_remove_reference(obj: service);
7101#if __MigKernelSpecificCode
7102#endif /* __MigKernelSpecificCode */
7103
7104 OutUP->NDR = NDR_record;
7105
7106
7107 __AfterRcvRpc(2851, "io_service_acknowledge_notification")
7108}
7109
7110#if ( __MigTypeCheck )
7111#if __MIG_check__Request__iokit_subsystem__
7112#if !defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined)
7113#define __MIG_check__Request__io_connect_get_notification_semaphore_t__defined
7114
7115mig_internal kern_return_t __MIG_check__Request__io_connect_get_notification_semaphore_t(
7116 __attribute__((__unused__)) __RequestKData__io_connect_get_notification_semaphore_t *InKP,
7117 __attribute__((__unused__)) __RequestUData__io_connect_get_notification_semaphore_t *In0UP,
7118 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
7119{
7120
7121 typedef __Request__io_connect_get_notification_semaphore_t __Request;
7122 typedef __RequestUData__io_connect_get_notification_semaphore_t __RequestU __attribute__((unused));
7123#if __MigTypeCheck
7124 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7125 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
7126 return MIG_BAD_ARGUMENTS;
7127#endif /* __MigTypeCheck */
7128
7129 return MACH_MSG_SUCCESS;
7130}
7131#endif /* !defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined) */
7132#endif /* __MIG_check__Request__iokit_subsystem__ */
7133#endif /* ( __MigTypeCheck ) */
7134
7135
7136/* Routine io_connect_get_notification_semaphore */
7137mig_internal novalue _Xio_connect_get_notification_semaphore
7138 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
7139 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7140 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
7141{
7142
7143#ifdef __MigPackStructs
7144#pragma pack(push, 4)
7145#endif
7146 typedef struct {
7147 NDR_record_t NDR;
7148 natural_t notification_type;
7149 mach_msg_trailer_t trailer;
7150 char padding[0]; /* Avoid generating empty UData structs */
7151 } RequestU __attribute__((unused));
7152#ifdef __MigPackStructs
7153#pragma pack(pop)
7154#endif
7155 typedef __RequestKData__io_connect_get_notification_semaphore_t RequestK;
7156 typedef __RequestUData__io_connect_get_notification_semaphore_t __RequestU;
7157 typedef __ReplyKData__io_connect_get_notification_semaphore_t ReplyK __attribute__((unused));
7158 typedef __ReplyUData__io_connect_get_notification_semaphore_t ReplyU __attribute__((unused));
7159 typedef __Reply__io_connect_get_notification_semaphore_t Reply __attribute__((unused));
7160 typedef __Request__io_connect_get_notification_semaphore_t __Request __attribute__((unused));
7161
7162 /*
7163 * typedef struct {
7164 * mach_msg_header_t Head;
7165 * NDR_record_t NDR;
7166 * kern_return_t RetCode;
7167 * } mig_reply_error_t;
7168 */
7169
7170 RequestK *InKP = (RequestK *) InHeadP;
7171 RequestU *In0UP = (RequestU *) InDataP;
7172 ReplyK *OutKP = (ReplyK *) OutHeadP;
7173 ReplyU *OutUP = (ReplyU *) OutDataP;
7174 (void)OutUP;
7175#ifdef __MIG_check__Request__io_connect_get_notification_semaphore_t__defined
7176 kern_return_t check_result;
7177#endif /* __MIG_check__Request__io_connect_get_notification_semaphore_t__defined */
7178
7179#if __MigKernelSpecificCode
7180#if UseStaticTemplates
7181 const static mach_msg_port_descriptor_t semaphoreTemplate = {
7182 /* name = */ MACH_PORT_NULL,
7183 /* pad1 = */ 0,
7184 /* pad2 = */ 0,
7185 /* disp = */ 17,
7186 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
7187 };
7188#endif /* UseStaticTemplates */
7189
7190#else
7191#if UseStaticTemplates
7192 const static mach_msg_port_descriptor_t semaphoreTemplate = {
7193 /* name = */ MACH_PORT_NULL,
7194 /* pad1 = */ 0,
7195 /* pad2 = */ 0,
7196 /* disp = */ 19,
7197 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
7198 };
7199#endif /* UseStaticTemplates */
7200
7201#endif /* __MigKernelSpecificCode */
7202 kern_return_t RetCode;
7203 io_connect_t connection;
7204 semaphore_t semaphore;
7205
7206 __DeclareRcvRpc(2852, "io_connect_get_notification_semaphore")
7207 __BeforeRcvRpc(2852, "io_connect_get_notification_semaphore")
7208
7209#if defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined)
7210 check_result = __MIG_check__Request__io_connect_get_notification_semaphore_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
7211 if (check_result != MACH_MSG_SUCCESS)
7212 { MIG_RETURN_ERROR(OutKP, check_result); }
7213#endif /* defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined) */
7214
7215#if UseStaticTemplates
7216 OutKP->semaphore = semaphoreTemplate;
7217#else /* UseStaticTemplates */
7218#if __MigKernelSpecificCode
7219 OutKP->semaphore.disposition = 17;
7220#else
7221 OutKP->semaphore.disposition = 19;
7222#endif /* __MigKernelSpecificCode */
7223#if !(defined(KERNEL) && defined(__LP64__))
7224 OutKP->semaphore.pad1 = 0;
7225#endif
7226 OutKP->semaphore.pad2 = 0;
7227 OutKP->semaphore.type = MACH_MSG_PORT_DESCRIPTOR;
7228#if defined(KERNEL)
7229 OutKP->semaphore.pad_end = 0;
7230#endif
7231#endif /* UseStaticTemplates */
7232
7233
7234 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
7235
7236 RetCode = is_io_connect_get_notification_semaphore(connection, notification_type: In0UP->notification_type, semaphore: &semaphore);
7237 iokit_remove_connect_reference(obj: connection);
7238 if (RetCode != KERN_SUCCESS) {
7239 MIG_RETURN_ERROR(OutKP, RetCode);
7240 }
7241#if __MigKernelSpecificCode
7242#endif /* __MigKernelSpecificCode */
7243 OutKP->semaphore.name = (mach_port_t)convert_semaphore_to_port(semaphore);
7244
7245
7246 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
7247 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
7248 OutKP->msgh_body.msgh_descriptor_count = 1;
7249 __AfterRcvRpc(2852, "io_connect_get_notification_semaphore")
7250}
7251
7252#if ( __MigTypeCheck )
7253#if __MIG_check__Request__iokit_subsystem__
7254#if !defined(__MIG_check__Request__io_connect_unmap_memory_t__defined)
7255#define __MIG_check__Request__io_connect_unmap_memory_t__defined
7256
7257mig_internal kern_return_t __MIG_check__Request__io_connect_unmap_memory_t(
7258 __attribute__((__unused__)) __RequestKData__io_connect_unmap_memory_t *InKP,
7259 __attribute__((__unused__)) __RequestUData__io_connect_unmap_memory_t *In0UP,
7260 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
7261{
7262
7263 typedef __Request__io_connect_unmap_memory_t __Request;
7264 typedef __RequestUData__io_connect_unmap_memory_t __RequestU __attribute__((unused));
7265#if __MigTypeCheck
7266 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7267 (InKP->msgh_body.msgh_descriptor_count != 1) ||
7268 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
7269 return MIG_BAD_ARGUMENTS;
7270#endif /* __MigTypeCheck */
7271
7272#if __MigTypeCheck
7273 if (InKP->into_task.type != MACH_MSG_PORT_DESCRIPTOR ||
7274 InKP->into_task.disposition != 17)
7275 return MIG_TYPE_ERROR;
7276#endif /* __MigTypeCheck */
7277
7278 return MACH_MSG_SUCCESS;
7279}
7280#endif /* !defined(__MIG_check__Request__io_connect_unmap_memory_t__defined) */
7281#endif /* __MIG_check__Request__iokit_subsystem__ */
7282#endif /* ( __MigTypeCheck ) */
7283
7284
7285/* Routine io_connect_unmap_memory */
7286mig_internal novalue _Xio_connect_unmap_memory
7287 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
7288 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7289 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
7290{
7291
7292#ifdef __MigPackStructs
7293#pragma pack(push, 4)
7294#endif
7295 typedef struct {
7296 NDR_record_t NDR;
7297 uint32_t memory_type;
7298 uint32_t address;
7299 mach_msg_trailer_t trailer;
7300 char padding[0]; /* Avoid generating empty UData structs */
7301 } RequestU __attribute__((unused));
7302#ifdef __MigPackStructs
7303#pragma pack(pop)
7304#endif
7305 typedef __RequestKData__io_connect_unmap_memory_t RequestK;
7306 typedef __RequestUData__io_connect_unmap_memory_t __RequestU;
7307 typedef __ReplyKData__io_connect_unmap_memory_t ReplyK __attribute__((unused));
7308 typedef __ReplyUData__io_connect_unmap_memory_t ReplyU __attribute__((unused));
7309 typedef __Reply__io_connect_unmap_memory_t Reply __attribute__((unused));
7310 typedef __Request__io_connect_unmap_memory_t __Request __attribute__((unused));
7311
7312 /*
7313 * typedef struct {
7314 * mach_msg_header_t Head;
7315 * NDR_record_t NDR;
7316 * kern_return_t RetCode;
7317 * } mig_reply_error_t;
7318 */
7319
7320 RequestK *InKP = (RequestK *) InHeadP;
7321 RequestU *In0UP = (RequestU *) InDataP;
7322 ReplyK *OutKP = (ReplyK *) OutHeadP;
7323 ReplyU *OutUP = (ReplyU *) OutDataP;
7324 (void)OutUP;
7325#ifdef __MIG_check__Request__io_connect_unmap_memory_t__defined
7326 kern_return_t check_result;
7327#endif /* __MIG_check__Request__io_connect_unmap_memory_t__defined */
7328
7329#if __MigKernelSpecificCode
7330#else
7331#endif /* __MigKernelSpecificCode */
7332 io_connect_t connection;
7333 task_t into_task;
7334
7335 __DeclareRcvRpc(2853, "io_connect_unmap_memory")
7336 __BeforeRcvRpc(2853, "io_connect_unmap_memory")
7337
7338#if defined(__MIG_check__Request__io_connect_unmap_memory_t__defined)
7339 check_result = __MIG_check__Request__io_connect_unmap_memory_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
7340 if (check_result != MACH_MSG_SUCCESS)
7341 { MIG_RETURN_ERROR(OutKP, check_result); }
7342#endif /* defined(__MIG_check__Request__io_connect_unmap_memory_t__defined) */
7343
7344 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
7345
7346 into_task = convert_port_to_task_mig(port: InKP->into_task.name);
7347
7348 OutUP->RetCode = is_io_connect_unmap_memory(connection, memory_type: In0UP->memory_type, into_task, address: In0UP->address);
7349 task_deallocate_mig(into_task);
7350 iokit_remove_connect_reference(obj: connection);
7351#if __MigKernelSpecificCode
7352 if (OutUP->RetCode != KERN_SUCCESS) {
7353 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
7354 }
7355 ipc_port_release_send(port: (ipc_port_t)InKP->into_task.name);
7356#endif /* __MigKernelSpecificCode */
7357
7358 OutUP->NDR = NDR_record;
7359
7360
7361 __AfterRcvRpc(2853, "io_connect_unmap_memory")
7362}
7363
7364#if ( __MigTypeCheck )
7365#if __MIG_check__Request__iokit_subsystem__
7366#if !defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined)
7367#define __MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined
7368
7369mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_location_in_plane_t(
7370 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_location_in_plane_t *InKP,
7371 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_location_in_plane_t *In0UP,
7372 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
7373{
7374
7375 typedef __Request__io_registry_entry_get_location_in_plane_t __Request;
7376 typedef __RequestUData__io_registry_entry_get_location_in_plane_t __RequestU __attribute__((unused));
7377#if __MigTypeCheck
7378 unsigned int msgh_size;
7379#endif /* __MigTypeCheck */
7380
7381#if __MigTypeCheck
7382 msgh_size = InKP->Head.msgh_size;
7383 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7384 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
7385 return MIG_BAD_ARGUMENTS;
7386#endif /* __MigTypeCheck */
7387
7388#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_location_in_plane_t__planeCnt__defined)
7389 if (In0UP->NDR.int_rep != NDR_record.int_rep)
7390 __NDR_convert__int_rep__Request__io_registry_entry_get_location_in_plane_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
7391#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_location_in_plane_t__planeCnt__defined */
7392#if __MigTypeCheck
7393 if (In0UP->planeCnt > 128)
7394 return MIG_BAD_ARGUMENTS;
7395 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
7396 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
7397 return MIG_BAD_ARGUMENTS;
7398#endif /* __MigTypeCheck */
7399
7400#if __MigTypeCheck
7401 {
7402 char * msg_limit = (char *) InTrailerP;
7403#if __MigKernelSpecificCode
7404 size_t strnlen_limit;
7405#else
7406 size_t memchr_limit;
7407#endif /* __MigKernelSpecificCode */
7408
7409#if __MigKernelSpecificCode
7410 strnlen_limit = min((msg_limit - In0UP->plane), 128);
7411 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
7412 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
7413#else
7414 memchr_limit = min((msg_limit - In0UP->plane), 128);
7415 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
7416 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
7417#endif /* __MigKernelSpecificCode */
7418 }
7419#endif /* __MigTypeCheck */
7420
7421 return MACH_MSG_SUCCESS;
7422}
7423#endif /* !defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined) */
7424#endif /* __MIG_check__Request__iokit_subsystem__ */
7425#endif /* ( __MigTypeCheck ) */
7426
7427
7428/* Routine io_registry_entry_get_location_in_plane */
7429mig_internal novalue _Xio_registry_entry_get_location_in_plane
7430 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
7431 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7432 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
7433{
7434
7435#ifdef __MigPackStructs
7436#pragma pack(push, 4)
7437#endif
7438 typedef struct {
7439 NDR_record_t NDR;
7440 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
7441 mach_msg_type_number_t planeCnt;
7442 char plane[128];
7443 mach_msg_trailer_t trailer;
7444 char padding[0]; /* Avoid generating empty UData structs */
7445 } RequestU __attribute__((unused));
7446#ifdef __MigPackStructs
7447#pragma pack(pop)
7448#endif
7449 typedef __RequestKData__io_registry_entry_get_location_in_plane_t RequestK;
7450 typedef __RequestUData__io_registry_entry_get_location_in_plane_t __RequestU;
7451 typedef __ReplyKData__io_registry_entry_get_location_in_plane_t ReplyK __attribute__((unused));
7452 typedef __ReplyUData__io_registry_entry_get_location_in_plane_t ReplyU __attribute__((unused));
7453 typedef __Reply__io_registry_entry_get_location_in_plane_t Reply __attribute__((unused));
7454 typedef __Request__io_registry_entry_get_location_in_plane_t __Request __attribute__((unused));
7455
7456 /*
7457 * typedef struct {
7458 * mach_msg_header_t Head;
7459 * NDR_record_t NDR;
7460 * kern_return_t RetCode;
7461 * } mig_reply_error_t;
7462 */
7463
7464 RequestK *InKP = (RequestK *) InHeadP;
7465 RequestU *In0UP = (RequestU *) InDataP;
7466 ReplyK *OutKP = (ReplyK *) OutHeadP;
7467 ReplyU *OutUP = (ReplyU *) OutDataP;
7468 (void)OutUP;
7469#ifdef __MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined
7470 kern_return_t check_result;
7471#endif /* __MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined */
7472
7473#if __MigKernelSpecificCode
7474#else
7475#endif /* __MigKernelSpecificCode */
7476 io_object_t registry_entry;
7477
7478 __DeclareRcvRpc(2854, "io_registry_entry_get_location_in_plane")
7479 __BeforeRcvRpc(2854, "io_registry_entry_get_location_in_plane")
7480
7481#if defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined)
7482 check_result = __MIG_check__Request__io_registry_entry_get_location_in_plane_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
7483 if (check_result != MACH_MSG_SUCCESS)
7484 { MIG_RETURN_ERROR(OutKP, check_result); }
7485#endif /* defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined) */
7486
7487 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
7488
7489 OutUP->RetCode = is_io_registry_entry_get_location_in_plane(registry_entry, plane: In0UP->plane, location: OutUP->location);
7490 iokit_remove_reference(obj: registry_entry);
7491 if (OutUP->RetCode != KERN_SUCCESS) {
7492 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
7493 }
7494#if __MigKernelSpecificCode
7495#endif /* __MigKernelSpecificCode */
7496
7497 OutUP->NDR = NDR_record;
7498
7499#ifdef __LP64__
7500 {
7501 size_t strLength = strlen(s: OutUP->location) + 1;
7502 if (strLength > 0xffffffff)
7503 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
7504 OutUP->locationCnt = (mach_msg_type_number_t) strLength;
7505 }
7506#else
7507 OutUP->locationCnt = (mach_msg_type_number_t) strlen(OutUP->location) + 1;
7508#endif /* __LP64__ */
7509 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutUP->locationCnt + 3) & ~3));
7510
7511 __AfterRcvRpc(2854, "io_registry_entry_get_location_in_plane")
7512}
7513
7514#if ( __MigTypeCheck )
7515#if __MIG_check__Request__iokit_subsystem__
7516#if !defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined)
7517#define __MIG_check__Request__io_registry_entry_get_property_recursively_t__defined
7518
7519mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_recursively_t(
7520 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_property_recursively_t *InKP,
7521 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_recursively_t *In0UP,
7522 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7523 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_recursively_t **In1UPP,
7524 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_recursively_t **In2UPP)
7525{
7526
7527 typedef __Request__io_registry_entry_get_property_recursively_t __Request;
7528 typedef __RequestUData__io_registry_entry_get_property_recursively_t __RequestU __attribute__((unused));
7529 __RequestU *In1UP;
7530 __RequestU *In2UP;
7531#if __MigTypeCheck
7532 unsigned int msgh_size;
7533#endif /* __MigTypeCheck */
7534 unsigned int msgh_size_delta;
7535
7536#if __MigTypeCheck
7537 msgh_size = InKP->Head.msgh_size;
7538 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7539 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
7540 return MIG_BAD_ARGUMENTS;
7541#endif /* __MigTypeCheck */
7542
7543#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__planeCnt__defined)
7544 if (In0UP->NDR.int_rep != NDR_record.int_rep)
7545 __NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
7546#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__planeCnt__defined */
7547 msgh_size_delta = _WALIGN_(In0UP->planeCnt);
7548#if __MigTypeCheck
7549 if (In0UP->planeCnt > 128)
7550 return MIG_BAD_ARGUMENTS;
7551 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In0UP->planeCnt) ||
7552 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In0UP->planeCnt)))
7553 return MIG_BAD_ARGUMENTS;
7554 msgh_size -= msgh_size_delta;
7555#endif /* __MigTypeCheck */
7556
7557 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
7558
7559#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__property_nameCnt__defined)
7560 if (In0UP->NDR.int_rep != NDR_record.int_rep)
7561 __NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__property_nameCnt(&In1UP->property_nameCnt, In1UP->NDR.int_rep);
7562#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__property_nameCnt__defined */
7563 msgh_size_delta = _WALIGN_(In1UP->property_nameCnt);
7564#if __MigTypeCheck
7565 if (In1UP->property_nameCnt > 128)
7566 return MIG_BAD_ARGUMENTS;
7567 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In1UP->property_nameCnt) ||
7568 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In1UP->property_nameCnt)))
7569 return MIG_BAD_ARGUMENTS;
7570#endif /* __MigTypeCheck */
7571
7572 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 128);
7573
7574#if __MigTypeCheck
7575 {
7576 char * msg_limit = (char *) InTrailerP;
7577#if __MigKernelSpecificCode
7578 size_t strnlen_limit;
7579#else
7580 size_t memchr_limit;
7581#endif /* __MigKernelSpecificCode */
7582
7583#if __MigKernelSpecificCode
7584 strnlen_limit = min((msg_limit - In0UP->plane), 128);
7585 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
7586 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
7587#else
7588 memchr_limit = min((msg_limit - In0UP->plane), 128);
7589 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
7590 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
7591#endif /* __MigKernelSpecificCode */
7592#if __MigKernelSpecificCode
7593 strnlen_limit = min((msg_limit - In1UP->property_name), 128);
7594 if (( strnlen(s: In1UP->property_name, n: strnlen_limit) >= 128 + 1 ))
7595 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
7596#else
7597 memchr_limit = min((msg_limit - In1UP->property_name), 128);
7598 if (( memchr(In1UP->property_name, '\0', memchr_limit) == NULL ))
7599 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
7600#endif /* __MigKernelSpecificCode */
7601 }
7602#endif /* __MigTypeCheck */
7603
7604 return MACH_MSG_SUCCESS;
7605}
7606#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined) */
7607#endif /* __MIG_check__Request__iokit_subsystem__ */
7608#endif /* ( __MigTypeCheck ) */
7609
7610
7611/* Routine io_registry_entry_get_property_recursively */
7612mig_internal novalue _Xio_registry_entry_get_property_recursively
7613 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
7614 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7615 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
7616{
7617
7618#ifdef __MigPackStructs
7619#pragma pack(push, 4)
7620#endif
7621 typedef struct {
7622 NDR_record_t NDR;
7623 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
7624 mach_msg_type_number_t planeCnt;
7625 char plane[128];
7626 mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
7627 mach_msg_type_number_t property_nameCnt;
7628 char property_name[128];
7629 uint32_t options;
7630 mach_msg_trailer_t trailer;
7631 char padding[0]; /* Avoid generating empty UData structs */
7632 } RequestU __attribute__((unused));
7633#ifdef __MigPackStructs
7634#pragma pack(pop)
7635#endif
7636 typedef __RequestKData__io_registry_entry_get_property_recursively_t RequestK;
7637 typedef __RequestUData__io_registry_entry_get_property_recursively_t __RequestU;
7638 typedef __ReplyKData__io_registry_entry_get_property_recursively_t ReplyK __attribute__((unused));
7639 typedef __ReplyUData__io_registry_entry_get_property_recursively_t ReplyU __attribute__((unused));
7640 typedef __Reply__io_registry_entry_get_property_recursively_t Reply __attribute__((unused));
7641 typedef __Request__io_registry_entry_get_property_recursively_t __Request __attribute__((unused));
7642
7643 /*
7644 * typedef struct {
7645 * mach_msg_header_t Head;
7646 * NDR_record_t NDR;
7647 * kern_return_t RetCode;
7648 * } mig_reply_error_t;
7649 */
7650
7651 RequestK *InKP = (RequestK *) InHeadP;
7652 RequestU *In0UP = (RequestU *) InDataP;
7653 RequestU *In1UP;
7654 RequestU *In2UP;
7655 ReplyK *OutKP = (ReplyK *) OutHeadP;
7656 ReplyU *OutUP = (ReplyU *) OutDataP;
7657 (void)OutUP;
7658#ifdef __MIG_check__Request__io_registry_entry_get_property_recursively_t__defined
7659 kern_return_t check_result;
7660#endif /* __MIG_check__Request__io_registry_entry_get_property_recursively_t__defined */
7661
7662#if __MigKernelSpecificCode
7663#if UseStaticTemplates
7664 const static mach_msg_ool_descriptor_t propertiesTemplate = {
7665 /* addr = */ (void *)0,
7666 /* size = */ 0,
7667 /* deal = */ FALSE,
7668 /* copy = */ MACH_MSG_PHYSICAL_COPY,
7669 /* pad2 = */ 0,
7670 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
7671 };
7672#endif /* UseStaticTemplates */
7673
7674#else
7675#if UseStaticTemplates
7676 const static mach_msg_ool_descriptor_t propertiesTemplate = {
7677 /* addr = */ (void *)0,
7678 /* size = */ 0,
7679 /* deal = */ FALSE,
7680 /* copy = */ MACH_MSG_PHYSICAL_COPY,
7681 /* pad2 = */ 0,
7682 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
7683 };
7684#endif /* UseStaticTemplates */
7685
7686#endif /* __MigKernelSpecificCode */
7687 kern_return_t RetCode;
7688 io_object_t registry_entry;
7689
7690 __DeclareRcvRpc(2855, "io_registry_entry_get_property_recursively")
7691 __BeforeRcvRpc(2855, "io_registry_entry_get_property_recursively")
7692
7693#if defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined)
7694 check_result = __MIG_check__Request__io_registry_entry_get_property_recursively_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
7695 if (check_result != MACH_MSG_SUCCESS)
7696 { MIG_RETURN_ERROR(OutKP, check_result); }
7697#endif /* defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined) */
7698
7699#if UseStaticTemplates
7700 OutKP->properties = propertiesTemplate;
7701#else /* UseStaticTemplates */
7702 OutKP->properties.deallocate = FALSE;
7703 OutKP->properties.copy = MACH_MSG_PHYSICAL_COPY;
7704 OutKP->properties.pad1 = 0;
7705 OutKP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
7706#if defined(KERNEL) && !defined(__LP64__)
7707 OutKP->properties.pad_end = 0;
7708#endif
7709#endif /* UseStaticTemplates */
7710
7711
7712 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
7713
7714 RetCode = is_io_registry_entry_get_property_recursively(registry_entry, plane: In0UP->plane, property_name: In1UP->property_name, options: In2UP->options, properties: (io_buf_ptr_t *)&(OutKP->properties.address), propertiesCnt: &OutUP->propertiesCnt);
7715 iokit_remove_reference(obj: registry_entry);
7716 if (RetCode != KERN_SUCCESS) {
7717 MIG_RETURN_ERROR(OutKP, RetCode);
7718 }
7719#if __MigKernelSpecificCode
7720#endif /* __MigKernelSpecificCode */
7721 OutKP->properties.size = OutUP->propertiesCnt;
7722
7723
7724 OutUP->NDR = NDR_record;
7725
7726
7727 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
7728 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
7729 OutKP->msgh_body.msgh_descriptor_count = 1;
7730 __AfterRcvRpc(2855, "io_registry_entry_get_property_recursively")
7731}
7732
7733#if ( __MigTypeCheck )
7734#if __MIG_check__Request__iokit_subsystem__
7735#if !defined(__MIG_check__Request__io_service_get_state_t__defined)
7736#define __MIG_check__Request__io_service_get_state_t__defined
7737
7738mig_internal kern_return_t __MIG_check__Request__io_service_get_state_t(
7739 __attribute__((__unused__)) __RequestKData__io_service_get_state_t *InKP,
7740 __attribute__((__unused__)) __RequestUData__io_service_get_state_t *In0UP,
7741 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
7742{
7743
7744 typedef __Request__io_service_get_state_t __Request;
7745 typedef __RequestUData__io_service_get_state_t __RequestU __attribute__((unused));
7746#if __MigTypeCheck
7747 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7748 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
7749 return MIG_BAD_ARGUMENTS;
7750#endif /* __MigTypeCheck */
7751
7752 return MACH_MSG_SUCCESS;
7753}
7754#endif /* !defined(__MIG_check__Request__io_service_get_state_t__defined) */
7755#endif /* __MIG_check__Request__iokit_subsystem__ */
7756#endif /* ( __MigTypeCheck ) */
7757
7758
7759/* Routine io_service_get_state */
7760mig_internal novalue _Xio_service_get_state
7761 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
7762 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7763 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
7764{
7765
7766#ifdef __MigPackStructs
7767#pragma pack(push, 4)
7768#endif
7769 typedef struct {
7770 mach_msg_trailer_t trailer;
7771 char padding[0]; /* Avoid generating empty UData structs */
7772 } RequestU __attribute__((unused));
7773#ifdef __MigPackStructs
7774#pragma pack(pop)
7775#endif
7776 typedef __RequestKData__io_service_get_state_t RequestK;
7777 typedef __RequestUData__io_service_get_state_t __RequestU;
7778 typedef __ReplyKData__io_service_get_state_t ReplyK __attribute__((unused));
7779 typedef __ReplyUData__io_service_get_state_t ReplyU __attribute__((unused));
7780 typedef __Reply__io_service_get_state_t Reply __attribute__((unused));
7781 typedef __Request__io_service_get_state_t __Request __attribute__((unused));
7782
7783 /*
7784 * typedef struct {
7785 * mach_msg_header_t Head;
7786 * NDR_record_t NDR;
7787 * kern_return_t RetCode;
7788 * } mig_reply_error_t;
7789 */
7790
7791 RequestK *InKP = (RequestK *) InHeadP;
7792 RequestU *In0UP = (RequestU *) InDataP;
7793 ReplyK *OutKP = (ReplyK *) OutHeadP;
7794 ReplyU *OutUP = (ReplyU *) OutDataP;
7795 (void)OutUP;
7796#ifdef __MIG_check__Request__io_service_get_state_t__defined
7797 kern_return_t check_result;
7798#endif /* __MIG_check__Request__io_service_get_state_t__defined */
7799
7800#if __MigKernelSpecificCode
7801#else
7802#endif /* __MigKernelSpecificCode */
7803 io_object_t service;
7804
7805 __DeclareRcvRpc(2856, "io_service_get_state")
7806 __BeforeRcvRpc(2856, "io_service_get_state")
7807
7808#if defined(__MIG_check__Request__io_service_get_state_t__defined)
7809 check_result = __MIG_check__Request__io_service_get_state_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
7810 if (check_result != MACH_MSG_SUCCESS)
7811 { MIG_RETURN_ERROR(OutKP, check_result); }
7812#endif /* defined(__MIG_check__Request__io_service_get_state_t__defined) */
7813
7814 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
7815
7816 OutUP->RetCode = is_io_service_get_state(service, state: &OutUP->state, busy_state: &OutUP->busy_state, accumulated_busy_time: &OutUP->accumulated_busy_time);
7817 iokit_remove_reference(obj: service);
7818 if (OutUP->RetCode != KERN_SUCCESS) {
7819 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
7820 }
7821#if __MigKernelSpecificCode
7822#endif /* __MigKernelSpecificCode */
7823
7824 OutUP->NDR = NDR_record;
7825
7826
7827 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
7828 __AfterRcvRpc(2856, "io_service_get_state")
7829}
7830
7831#if ( __MigTypeCheck )
7832#if __MIG_check__Request__iokit_subsystem__
7833#if !defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined)
7834#define __MIG_check__Request__io_service_get_matching_services_ool_t__defined
7835
7836mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_services_ool_t(
7837 __attribute__((__unused__)) __RequestKData__io_service_get_matching_services_ool_t *InKP,
7838 __attribute__((__unused__)) __RequestUData__io_service_get_matching_services_ool_t *In0UP,
7839 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
7840{
7841
7842 typedef __Request__io_service_get_matching_services_ool_t __Request;
7843 typedef __RequestUData__io_service_get_matching_services_ool_t __RequestU __attribute__((unused));
7844#if __MigTypeCheck
7845 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7846 (InKP->msgh_body.msgh_descriptor_count != 1) ||
7847 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
7848 return MIG_BAD_ARGUMENTS;
7849#endif /* __MigTypeCheck */
7850
7851#if __MigTypeCheck
7852 if (InKP->matching.type != MACH_MSG_OOL_DESCRIPTOR)
7853 return MIG_TYPE_ERROR;
7854#endif /* __MigTypeCheck */
7855
7856#if __MigTypeCheck
7857 if (InKP->matching.size != In0UP->matchingCnt)
7858 return MIG_TYPE_ERROR;
7859#endif /* __MigTypeCheck */
7860
7861 return MACH_MSG_SUCCESS;
7862}
7863#endif /* !defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined) */
7864#endif /* __MIG_check__Request__iokit_subsystem__ */
7865#endif /* ( __MigTypeCheck ) */
7866
7867
7868/* Routine io_service_get_matching_services_ool */
7869mig_internal novalue _Xio_service_get_matching_services_ool
7870 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
7871 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
7872 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
7873{
7874
7875#ifdef __MigPackStructs
7876#pragma pack(push, 4)
7877#endif
7878 typedef struct {
7879 NDR_record_t NDR;
7880 mach_msg_type_number_t matchingCnt;
7881 mach_msg_trailer_t trailer;
7882 char padding[0]; /* Avoid generating empty UData structs */
7883 } RequestU __attribute__((unused));
7884#ifdef __MigPackStructs
7885#pragma pack(pop)
7886#endif
7887 typedef __RequestKData__io_service_get_matching_services_ool_t RequestK;
7888 typedef __RequestUData__io_service_get_matching_services_ool_t __RequestU;
7889 typedef __ReplyKData__io_service_get_matching_services_ool_t ReplyK __attribute__((unused));
7890 typedef __ReplyUData__io_service_get_matching_services_ool_t ReplyU __attribute__((unused));
7891 typedef __Reply__io_service_get_matching_services_ool_t Reply __attribute__((unused));
7892 typedef __Request__io_service_get_matching_services_ool_t __Request __attribute__((unused));
7893
7894 /*
7895 * typedef struct {
7896 * mach_msg_header_t Head;
7897 * NDR_record_t NDR;
7898 * kern_return_t RetCode;
7899 * } mig_reply_error_t;
7900 */
7901
7902 RequestK *InKP = (RequestK *) InHeadP;
7903 RequestU *In0UP = (RequestU *) InDataP;
7904 ReplyK *OutKP = (ReplyK *) OutHeadP;
7905 ReplyU *OutUP = (ReplyU *) OutDataP;
7906 (void)OutUP;
7907#ifdef __MIG_check__Request__io_service_get_matching_services_ool_t__defined
7908 kern_return_t check_result;
7909#endif /* __MIG_check__Request__io_service_get_matching_services_ool_t__defined */
7910
7911#if __MigKernelSpecificCode
7912#if UseStaticTemplates
7913 const static mach_msg_port_descriptor_t existingTemplate = {
7914 /* name = */ MACH_PORT_NULL,
7915 /* pad1 = */ 0,
7916 /* pad2 = */ 0,
7917 /* disp = */ 17,
7918 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
7919 };
7920#endif /* UseStaticTemplates */
7921
7922#else
7923#if UseStaticTemplates
7924 const static mach_msg_port_descriptor_t existingTemplate = {
7925 /* name = */ MACH_PORT_NULL,
7926 /* pad1 = */ 0,
7927 /* pad2 = */ 0,
7928 /* disp = */ 19,
7929 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
7930 };
7931#endif /* UseStaticTemplates */
7932
7933#endif /* __MigKernelSpecificCode */
7934 kern_return_t RetCode;
7935 io_object_t existing;
7936
7937 __DeclareRcvRpc(2857, "io_service_get_matching_services_ool")
7938 __BeforeRcvRpc(2857, "io_service_get_matching_services_ool")
7939
7940#if defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined)
7941 check_result = __MIG_check__Request__io_service_get_matching_services_ool_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
7942 if (check_result != MACH_MSG_SUCCESS)
7943 { MIG_RETURN_ERROR(OutKP, check_result); }
7944#endif /* defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined) */
7945
7946#if UseStaticTemplates
7947 OutKP->existing = existingTemplate;
7948#else /* UseStaticTemplates */
7949#if __MigKernelSpecificCode
7950 OutKP->existing.disposition = 17;
7951#else
7952 OutKP->existing.disposition = 19;
7953#endif /* __MigKernelSpecificCode */
7954#if !(defined(KERNEL) && defined(__LP64__))
7955 OutKP->existing.pad1 = 0;
7956#endif
7957 OutKP->existing.pad2 = 0;
7958 OutKP->existing.type = MACH_MSG_PORT_DESCRIPTOR;
7959#if defined(KERNEL)
7960 OutKP->existing.pad_end = 0;
7961#endif
7962#endif /* UseStaticTemplates */
7963
7964
7965 RetCode = is_io_service_get_matching_services_ool(main_port: InKP->Head.msgh_request_port, matching: (io_buf_ptr_t)(InKP->matching.address), matchingCnt: InKP->matching.size, result: &OutUP->result, existing: &existing);
7966 if (RetCode != KERN_SUCCESS) {
7967 MIG_RETURN_ERROR(OutKP, RetCode);
7968 }
7969#if __MigKernelSpecificCode
7970#endif /* __MigKernelSpecificCode */
7971 OutKP->existing.name = (mach_port_t)iokit_make_object_port(obj: existing);
7972
7973
7974 OutUP->NDR = NDR_record;
7975
7976
7977 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
7978 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
7979 OutKP->msgh_body.msgh_descriptor_count = 1;
7980 __AfterRcvRpc(2857, "io_service_get_matching_services_ool")
7981}
7982
7983#if ( __MigTypeCheck )
7984#if __MIG_check__Request__iokit_subsystem__
7985#if !defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined)
7986#define __MIG_check__Request__io_service_match_property_table_ool_t__defined
7987
7988mig_internal kern_return_t __MIG_check__Request__io_service_match_property_table_ool_t(
7989 __attribute__((__unused__)) __RequestKData__io_service_match_property_table_ool_t *InKP,
7990 __attribute__((__unused__)) __RequestUData__io_service_match_property_table_ool_t *In0UP,
7991 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
7992{
7993
7994 typedef __Request__io_service_match_property_table_ool_t __Request;
7995 typedef __RequestUData__io_service_match_property_table_ool_t __RequestU __attribute__((unused));
7996#if __MigTypeCheck
7997 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
7998 (InKP->msgh_body.msgh_descriptor_count != 1) ||
7999 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
8000 return MIG_BAD_ARGUMENTS;
8001#endif /* __MigTypeCheck */
8002
8003#if __MigTypeCheck
8004 if (InKP->matching.type != MACH_MSG_OOL_DESCRIPTOR)
8005 return MIG_TYPE_ERROR;
8006#endif /* __MigTypeCheck */
8007
8008#if __MigTypeCheck
8009 if (InKP->matching.size != In0UP->matchingCnt)
8010 return MIG_TYPE_ERROR;
8011#endif /* __MigTypeCheck */
8012
8013 return MACH_MSG_SUCCESS;
8014}
8015#endif /* !defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined) */
8016#endif /* __MIG_check__Request__iokit_subsystem__ */
8017#endif /* ( __MigTypeCheck ) */
8018
8019
8020/* Routine io_service_match_property_table_ool */
8021mig_internal novalue _Xio_service_match_property_table_ool
8022 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
8023 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8024 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
8025{
8026
8027#ifdef __MigPackStructs
8028#pragma pack(push, 4)
8029#endif
8030 typedef struct {
8031 NDR_record_t NDR;
8032 mach_msg_type_number_t matchingCnt;
8033 mach_msg_trailer_t trailer;
8034 char padding[0]; /* Avoid generating empty UData structs */
8035 } RequestU __attribute__((unused));
8036#ifdef __MigPackStructs
8037#pragma pack(pop)
8038#endif
8039 typedef __RequestKData__io_service_match_property_table_ool_t RequestK;
8040 typedef __RequestUData__io_service_match_property_table_ool_t __RequestU;
8041 typedef __ReplyKData__io_service_match_property_table_ool_t ReplyK __attribute__((unused));
8042 typedef __ReplyUData__io_service_match_property_table_ool_t ReplyU __attribute__((unused));
8043 typedef __Reply__io_service_match_property_table_ool_t Reply __attribute__((unused));
8044 typedef __Request__io_service_match_property_table_ool_t __Request __attribute__((unused));
8045
8046 /*
8047 * typedef struct {
8048 * mach_msg_header_t Head;
8049 * NDR_record_t NDR;
8050 * kern_return_t RetCode;
8051 * } mig_reply_error_t;
8052 */
8053
8054 RequestK *InKP = (RequestK *) InHeadP;
8055 RequestU *In0UP = (RequestU *) InDataP;
8056 ReplyK *OutKP = (ReplyK *) OutHeadP;
8057 ReplyU *OutUP = (ReplyU *) OutDataP;
8058 (void)OutUP;
8059#ifdef __MIG_check__Request__io_service_match_property_table_ool_t__defined
8060 kern_return_t check_result;
8061#endif /* __MIG_check__Request__io_service_match_property_table_ool_t__defined */
8062
8063#if __MigKernelSpecificCode
8064#else
8065#endif /* __MigKernelSpecificCode */
8066 io_object_t service;
8067
8068 __DeclareRcvRpc(2858, "io_service_match_property_table_ool")
8069 __BeforeRcvRpc(2858, "io_service_match_property_table_ool")
8070
8071#if defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined)
8072 check_result = __MIG_check__Request__io_service_match_property_table_ool_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
8073 if (check_result != MACH_MSG_SUCCESS)
8074 { MIG_RETURN_ERROR(OutKP, check_result); }
8075#endif /* defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined) */
8076
8077 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
8078
8079 OutUP->RetCode = is_io_service_match_property_table_ool(service, matching: (io_buf_ptr_t)(InKP->matching.address), matchingCnt: InKP->matching.size, result: &OutUP->result, matches: &OutUP->matches);
8080 iokit_remove_reference(obj: service);
8081 if (OutUP->RetCode != KERN_SUCCESS) {
8082 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
8083 }
8084#if __MigKernelSpecificCode
8085#endif /* __MigKernelSpecificCode */
8086
8087 OutUP->NDR = NDR_record;
8088
8089
8090 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
8091 __AfterRcvRpc(2858, "io_service_match_property_table_ool")
8092}
8093
8094#if ( __MigTypeCheck )
8095#if __MIG_check__Request__iokit_subsystem__
8096#if !defined(__MIG_check__Request__io_service_add_notification_ool_t__defined)
8097#define __MIG_check__Request__io_service_add_notification_ool_t__defined
8098
8099mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_ool_t(
8100 __attribute__((__unused__)) __RequestKData__io_service_add_notification_ool_t *InKP,
8101 __attribute__((__unused__)) __RequestUData__io_service_add_notification_ool_t *In0UP,
8102 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8103 __attribute__((__unused__)) __RequestUData__io_service_add_notification_ool_t **In1UPP)
8104{
8105
8106 typedef __Request__io_service_add_notification_ool_t __Request;
8107 typedef __RequestUData__io_service_add_notification_ool_t __RequestU __attribute__((unused));
8108 __RequestU *In1UP;
8109#if __MigTypeCheck
8110 unsigned int msgh_size;
8111#endif /* __MigTypeCheck */
8112 unsigned int msgh_size_delta;
8113
8114#if __MigTypeCheck
8115 msgh_size = InKP->Head.msgh_size;
8116 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
8117 (InKP->msgh_body.msgh_descriptor_count != 2) ||
8118 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 160)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
8119 return MIG_BAD_ARGUMENTS;
8120#endif /* __MigTypeCheck */
8121
8122#if __MigTypeCheck
8123 if (InKP->matching.type != MACH_MSG_OOL_DESCRIPTOR)
8124 return MIG_TYPE_ERROR;
8125#endif /* __MigTypeCheck */
8126
8127#if __MigTypeCheck
8128 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
8129 InKP->wake_port.disposition != 17)
8130 return MIG_TYPE_ERROR;
8131#endif /* __MigTypeCheck */
8132
8133#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_ool_t__notification_typeCnt__defined)
8134 if (In0UP->NDR.int_rep != NDR_record.int_rep)
8135 __NDR_convert__int_rep__Request__io_service_add_notification_ool_t__notification_typeCnt(&In0UP->notification_typeCnt, In0UP->NDR.int_rep);
8136#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_ool_t__notification_typeCnt__defined */
8137 msgh_size_delta = _WALIGN_(In0UP->notification_typeCnt);
8138#if __MigTypeCheck
8139 if (In0UP->notification_typeCnt > 128)
8140 return MIG_BAD_ARGUMENTS;
8141 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 160)) < In0UP->notification_typeCnt) ||
8142 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 160) + _WALIGN_(In0UP->notification_typeCnt)))
8143 return MIG_BAD_ARGUMENTS;
8144 msgh_size -= msgh_size_delta;
8145#endif /* __MigTypeCheck */
8146
8147 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
8148
8149#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_ool_t__referenceCnt__defined)
8150 if (In0UP->NDR.int_rep != NDR_record.int_rep)
8151 __NDR_convert__int_rep__Request__io_service_add_notification_ool_t__referenceCnt(&In1UP->referenceCnt, In1UP->NDR.int_rep);
8152#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_ool_t__referenceCnt__defined */
8153#if __MigTypeCheck
8154 if (In1UP->referenceCnt > 8)
8155 return MIG_BAD_ARGUMENTS;
8156 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 160)) / 4 < In1UP->referenceCnt) ||
8157 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 160) + (4 * In1UP->referenceCnt)))
8158 return MIG_BAD_ARGUMENTS;
8159#endif /* __MigTypeCheck */
8160
8161#if __MigTypeCheck
8162 if (InKP->matching.size != In1UP->matchingCnt)
8163 return MIG_TYPE_ERROR;
8164#endif /* __MigTypeCheck */
8165
8166#if __MigTypeCheck
8167 {
8168 char * msg_limit = (char *) InTrailerP;
8169#if __MigKernelSpecificCode
8170 size_t strnlen_limit;
8171#else
8172 size_t memchr_limit;
8173#endif /* __MigKernelSpecificCode */
8174
8175#if __MigKernelSpecificCode
8176 strnlen_limit = min((msg_limit - In0UP->notification_type), 128);
8177 if (( strnlen(s: In0UP->notification_type, n: strnlen_limit) >= 128 + 1 ))
8178 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
8179#else
8180 memchr_limit = min((msg_limit - In0UP->notification_type), 128);
8181 if (( memchr(In0UP->notification_type, '\0', memchr_limit) == NULL ))
8182 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
8183#endif /* __MigKernelSpecificCode */
8184 }
8185#endif /* __MigTypeCheck */
8186
8187 return MACH_MSG_SUCCESS;
8188}
8189#endif /* !defined(__MIG_check__Request__io_service_add_notification_ool_t__defined) */
8190#endif /* __MIG_check__Request__iokit_subsystem__ */
8191#endif /* ( __MigTypeCheck ) */
8192
8193
8194/* Routine io_service_add_notification_ool */
8195mig_internal novalue _Xio_service_add_notification_ool
8196 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
8197 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8198 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
8199{
8200
8201#ifdef __MigPackStructs
8202#pragma pack(push, 4)
8203#endif
8204 typedef struct {
8205 NDR_record_t NDR;
8206 mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
8207 mach_msg_type_number_t notification_typeCnt;
8208 char notification_type[128];
8209 mach_msg_type_number_t matchingCnt;
8210 mach_msg_type_number_t referenceCnt;
8211 natural_t reference[8];
8212 mach_msg_trailer_t trailer;
8213 char padding[0]; /* Avoid generating empty UData structs */
8214 } RequestU __attribute__((unused));
8215#ifdef __MigPackStructs
8216#pragma pack(pop)
8217#endif
8218 typedef __RequestKData__io_service_add_notification_ool_t RequestK;
8219 typedef __RequestUData__io_service_add_notification_ool_t __RequestU;
8220 typedef __ReplyKData__io_service_add_notification_ool_t ReplyK __attribute__((unused));
8221 typedef __ReplyUData__io_service_add_notification_ool_t ReplyU __attribute__((unused));
8222 typedef __Reply__io_service_add_notification_ool_t Reply __attribute__((unused));
8223 typedef __Request__io_service_add_notification_ool_t __Request __attribute__((unused));
8224
8225 /*
8226 * typedef struct {
8227 * mach_msg_header_t Head;
8228 * NDR_record_t NDR;
8229 * kern_return_t RetCode;
8230 * } mig_reply_error_t;
8231 */
8232
8233 RequestK *InKP = (RequestK *) InHeadP;
8234 RequestU *In0UP = (RequestU *) InDataP;
8235 RequestU *In1UP;
8236 ReplyK *OutKP = (ReplyK *) OutHeadP;
8237 ReplyU *OutUP = (ReplyU *) OutDataP;
8238 (void)OutUP;
8239#ifdef __MIG_check__Request__io_service_add_notification_ool_t__defined
8240 kern_return_t check_result;
8241#endif /* __MIG_check__Request__io_service_add_notification_ool_t__defined */
8242
8243#if __MigKernelSpecificCode
8244#if UseStaticTemplates
8245 const static mach_msg_port_descriptor_t notificationTemplate = {
8246 /* name = */ MACH_PORT_NULL,
8247 /* pad1 = */ 0,
8248 /* pad2 = */ 0,
8249 /* disp = */ 17,
8250 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
8251 };
8252#endif /* UseStaticTemplates */
8253
8254#else
8255#if UseStaticTemplates
8256 const static mach_msg_port_descriptor_t notificationTemplate = {
8257 /* name = */ MACH_PORT_NULL,
8258 /* pad1 = */ 0,
8259 /* pad2 = */ 0,
8260 /* disp = */ 19,
8261 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
8262 };
8263#endif /* UseStaticTemplates */
8264
8265#endif /* __MigKernelSpecificCode */
8266 kern_return_t RetCode;
8267 io_object_t notification;
8268
8269 __DeclareRcvRpc(2859, "io_service_add_notification_ool")
8270 __BeforeRcvRpc(2859, "io_service_add_notification_ool")
8271
8272#if defined(__MIG_check__Request__io_service_add_notification_ool_t__defined)
8273 check_result = __MIG_check__Request__io_service_add_notification_ool_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
8274 if (check_result != MACH_MSG_SUCCESS)
8275 { MIG_RETURN_ERROR(OutKP, check_result); }
8276#endif /* defined(__MIG_check__Request__io_service_add_notification_ool_t__defined) */
8277
8278#if UseStaticTemplates
8279 OutKP->notification = notificationTemplate;
8280#else /* UseStaticTemplates */
8281#if __MigKernelSpecificCode
8282 OutKP->notification.disposition = 17;
8283#else
8284 OutKP->notification.disposition = 19;
8285#endif /* __MigKernelSpecificCode */
8286#if !(defined(KERNEL) && defined(__LP64__))
8287 OutKP->notification.pad1 = 0;
8288#endif
8289 OutKP->notification.pad2 = 0;
8290 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
8291#if defined(KERNEL)
8292 OutKP->notification.pad_end = 0;
8293#endif
8294#endif /* UseStaticTemplates */
8295
8296
8297 RetCode = is_io_service_add_notification_ool(main_port: InKP->Head.msgh_request_port, notification_type: In0UP->notification_type, matching: (io_buf_ptr_t)(InKP->matching.address), matchingCnt: InKP->matching.size, wake_port: InKP->wake_port.name, reference: In1UP->reference, referenceCnt: In1UP->referenceCnt, result: &OutUP->result, notification: &notification);
8298 if (RetCode != KERN_SUCCESS) {
8299 MIG_RETURN_ERROR(OutKP, RetCode);
8300 }
8301#if __MigKernelSpecificCode
8302#endif /* __MigKernelSpecificCode */
8303 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
8304
8305
8306 OutUP->NDR = NDR_record;
8307
8308
8309 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
8310 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
8311 OutKP->msgh_body.msgh_descriptor_count = 1;
8312 __AfterRcvRpc(2859, "io_service_add_notification_ool")
8313}
8314
8315#if ( __MigTypeCheck )
8316#if __MIG_check__Request__iokit_subsystem__
8317#if !defined(__MIG_check__Request__io_object_get_superclass_t__defined)
8318#define __MIG_check__Request__io_object_get_superclass_t__defined
8319
8320mig_internal kern_return_t __MIG_check__Request__io_object_get_superclass_t(
8321 __attribute__((__unused__)) __RequestKData__io_object_get_superclass_t *InKP,
8322 __attribute__((__unused__)) __RequestUData__io_object_get_superclass_t *In0UP,
8323 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
8324{
8325
8326 typedef __Request__io_object_get_superclass_t __Request;
8327 typedef __RequestUData__io_object_get_superclass_t __RequestU __attribute__((unused));
8328#if __MigTypeCheck
8329 unsigned int msgh_size;
8330#endif /* __MigTypeCheck */
8331
8332#if __MigTypeCheck
8333 msgh_size = InKP->Head.msgh_size;
8334 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
8335 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
8336 return MIG_BAD_ARGUMENTS;
8337#endif /* __MigTypeCheck */
8338
8339#if defined(__NDR_convert__int_rep__Request__io_object_get_superclass_t__obj_nameCnt__defined)
8340 if (In0UP->NDR.int_rep != NDR_record.int_rep)
8341 __NDR_convert__int_rep__Request__io_object_get_superclass_t__obj_nameCnt(&In0UP->obj_nameCnt, In0UP->NDR.int_rep);
8342#endif /* __NDR_convert__int_rep__Request__io_object_get_superclass_t__obj_nameCnt__defined */
8343#if __MigTypeCheck
8344 if (In0UP->obj_nameCnt > 128)
8345 return MIG_BAD_ARGUMENTS;
8346 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->obj_nameCnt) ||
8347 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->obj_nameCnt)))
8348 return MIG_BAD_ARGUMENTS;
8349#endif /* __MigTypeCheck */
8350
8351#if __MigTypeCheck
8352 {
8353 char * msg_limit = (char *) InTrailerP;
8354#if __MigKernelSpecificCode
8355 size_t strnlen_limit;
8356#else
8357 size_t memchr_limit;
8358#endif /* __MigKernelSpecificCode */
8359
8360#if __MigKernelSpecificCode
8361 strnlen_limit = min((msg_limit - In0UP->obj_name), 128);
8362 if (( strnlen(s: In0UP->obj_name, n: strnlen_limit) >= 128 + 1 ))
8363 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
8364#else
8365 memchr_limit = min((msg_limit - In0UP->obj_name), 128);
8366 if (( memchr(In0UP->obj_name, '\0', memchr_limit) == NULL ))
8367 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
8368#endif /* __MigKernelSpecificCode */
8369 }
8370#endif /* __MigTypeCheck */
8371
8372 return MACH_MSG_SUCCESS;
8373}
8374#endif /* !defined(__MIG_check__Request__io_object_get_superclass_t__defined) */
8375#endif /* __MIG_check__Request__iokit_subsystem__ */
8376#endif /* ( __MigTypeCheck ) */
8377
8378
8379/* Routine io_object_get_superclass */
8380mig_internal novalue _Xio_object_get_superclass
8381 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
8382 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8383 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
8384{
8385
8386#ifdef __MigPackStructs
8387#pragma pack(push, 4)
8388#endif
8389 typedef struct {
8390 NDR_record_t NDR;
8391 mach_msg_type_number_t obj_nameOffset; /* MiG doesn't use it */
8392 mach_msg_type_number_t obj_nameCnt;
8393 char obj_name[128];
8394 mach_msg_trailer_t trailer;
8395 char padding[0]; /* Avoid generating empty UData structs */
8396 } RequestU __attribute__((unused));
8397#ifdef __MigPackStructs
8398#pragma pack(pop)
8399#endif
8400 typedef __RequestKData__io_object_get_superclass_t RequestK;
8401 typedef __RequestUData__io_object_get_superclass_t __RequestU;
8402 typedef __ReplyKData__io_object_get_superclass_t ReplyK __attribute__((unused));
8403 typedef __ReplyUData__io_object_get_superclass_t ReplyU __attribute__((unused));
8404 typedef __Reply__io_object_get_superclass_t Reply __attribute__((unused));
8405 typedef __Request__io_object_get_superclass_t __Request __attribute__((unused));
8406
8407 /*
8408 * typedef struct {
8409 * mach_msg_header_t Head;
8410 * NDR_record_t NDR;
8411 * kern_return_t RetCode;
8412 * } mig_reply_error_t;
8413 */
8414
8415 RequestK *InKP = (RequestK *) InHeadP;
8416 RequestU *In0UP = (RequestU *) InDataP;
8417 ReplyK *OutKP = (ReplyK *) OutHeadP;
8418 ReplyU *OutUP = (ReplyU *) OutDataP;
8419 (void)OutUP;
8420#ifdef __MIG_check__Request__io_object_get_superclass_t__defined
8421 kern_return_t check_result;
8422#endif /* __MIG_check__Request__io_object_get_superclass_t__defined */
8423
8424#if __MigKernelSpecificCode
8425#else
8426#endif /* __MigKernelSpecificCode */
8427 __DeclareRcvRpc(2860, "io_object_get_superclass")
8428 __BeforeRcvRpc(2860, "io_object_get_superclass")
8429
8430#if defined(__MIG_check__Request__io_object_get_superclass_t__defined)
8431 check_result = __MIG_check__Request__io_object_get_superclass_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
8432 if (check_result != MACH_MSG_SUCCESS)
8433 { MIG_RETURN_ERROR(OutKP, check_result); }
8434#endif /* defined(__MIG_check__Request__io_object_get_superclass_t__defined) */
8435
8436 OutUP->RetCode = is_io_object_get_superclass(main_port: InKP->Head.msgh_request_port, obj_name: In0UP->obj_name, class_name: OutUP->class_name);
8437 if (OutUP->RetCode != KERN_SUCCESS) {
8438 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
8439 }
8440#if __MigKernelSpecificCode
8441#endif /* __MigKernelSpecificCode */
8442
8443 OutUP->NDR = NDR_record;
8444
8445#ifdef __LP64__
8446 {
8447 size_t strLength = strlen(s: OutUP->class_name) + 1;
8448 if (strLength > 0xffffffff)
8449 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
8450 OutUP->class_nameCnt = (mach_msg_type_number_t) strLength;
8451 }
8452#else
8453 OutUP->class_nameCnt = (mach_msg_type_number_t) strlen(OutUP->class_name) + 1;
8454#endif /* __LP64__ */
8455 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutUP->class_nameCnt + 3) & ~3));
8456
8457 __AfterRcvRpc(2860, "io_object_get_superclass")
8458}
8459
8460#if ( __MigTypeCheck )
8461#if __MIG_check__Request__iokit_subsystem__
8462#if !defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined)
8463#define __MIG_check__Request__io_object_get_bundle_identifier_t__defined
8464
8465mig_internal kern_return_t __MIG_check__Request__io_object_get_bundle_identifier_t(
8466 __attribute__((__unused__)) __RequestKData__io_object_get_bundle_identifier_t *InKP,
8467 __attribute__((__unused__)) __RequestUData__io_object_get_bundle_identifier_t *In0UP,
8468 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
8469{
8470
8471 typedef __Request__io_object_get_bundle_identifier_t __Request;
8472 typedef __RequestUData__io_object_get_bundle_identifier_t __RequestU __attribute__((unused));
8473#if __MigTypeCheck
8474 unsigned int msgh_size;
8475#endif /* __MigTypeCheck */
8476
8477#if __MigTypeCheck
8478 msgh_size = InKP->Head.msgh_size;
8479 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
8480 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
8481 return MIG_BAD_ARGUMENTS;
8482#endif /* __MigTypeCheck */
8483
8484#if defined(__NDR_convert__int_rep__Request__io_object_get_bundle_identifier_t__obj_nameCnt__defined)
8485 if (In0UP->NDR.int_rep != NDR_record.int_rep)
8486 __NDR_convert__int_rep__Request__io_object_get_bundle_identifier_t__obj_nameCnt(&In0UP->obj_nameCnt, In0UP->NDR.int_rep);
8487#endif /* __NDR_convert__int_rep__Request__io_object_get_bundle_identifier_t__obj_nameCnt__defined */
8488#if __MigTypeCheck
8489 if (In0UP->obj_nameCnt > 128)
8490 return MIG_BAD_ARGUMENTS;
8491 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->obj_nameCnt) ||
8492 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->obj_nameCnt)))
8493 return MIG_BAD_ARGUMENTS;
8494#endif /* __MigTypeCheck */
8495
8496#if __MigTypeCheck
8497 {
8498 char * msg_limit = (char *) InTrailerP;
8499#if __MigKernelSpecificCode
8500 size_t strnlen_limit;
8501#else
8502 size_t memchr_limit;
8503#endif /* __MigKernelSpecificCode */
8504
8505#if __MigKernelSpecificCode
8506 strnlen_limit = min((msg_limit - In0UP->obj_name), 128);
8507 if (( strnlen(s: In0UP->obj_name, n: strnlen_limit) >= 128 + 1 ))
8508 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
8509#else
8510 memchr_limit = min((msg_limit - In0UP->obj_name), 128);
8511 if (( memchr(In0UP->obj_name, '\0', memchr_limit) == NULL ))
8512 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
8513#endif /* __MigKernelSpecificCode */
8514 }
8515#endif /* __MigTypeCheck */
8516
8517 return MACH_MSG_SUCCESS;
8518}
8519#endif /* !defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined) */
8520#endif /* __MIG_check__Request__iokit_subsystem__ */
8521#endif /* ( __MigTypeCheck ) */
8522
8523
8524/* Routine io_object_get_bundle_identifier */
8525mig_internal novalue _Xio_object_get_bundle_identifier
8526 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
8527 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8528 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
8529{
8530
8531#ifdef __MigPackStructs
8532#pragma pack(push, 4)
8533#endif
8534 typedef struct {
8535 NDR_record_t NDR;
8536 mach_msg_type_number_t obj_nameOffset; /* MiG doesn't use it */
8537 mach_msg_type_number_t obj_nameCnt;
8538 char obj_name[128];
8539 mach_msg_trailer_t trailer;
8540 char padding[0]; /* Avoid generating empty UData structs */
8541 } RequestU __attribute__((unused));
8542#ifdef __MigPackStructs
8543#pragma pack(pop)
8544#endif
8545 typedef __RequestKData__io_object_get_bundle_identifier_t RequestK;
8546 typedef __RequestUData__io_object_get_bundle_identifier_t __RequestU;
8547 typedef __ReplyKData__io_object_get_bundle_identifier_t ReplyK __attribute__((unused));
8548 typedef __ReplyUData__io_object_get_bundle_identifier_t ReplyU __attribute__((unused));
8549 typedef __Reply__io_object_get_bundle_identifier_t Reply __attribute__((unused));
8550 typedef __Request__io_object_get_bundle_identifier_t __Request __attribute__((unused));
8551
8552 /*
8553 * typedef struct {
8554 * mach_msg_header_t Head;
8555 * NDR_record_t NDR;
8556 * kern_return_t RetCode;
8557 * } mig_reply_error_t;
8558 */
8559
8560 RequestK *InKP = (RequestK *) InHeadP;
8561 RequestU *In0UP = (RequestU *) InDataP;
8562 ReplyK *OutKP = (ReplyK *) OutHeadP;
8563 ReplyU *OutUP = (ReplyU *) OutDataP;
8564 (void)OutUP;
8565#ifdef __MIG_check__Request__io_object_get_bundle_identifier_t__defined
8566 kern_return_t check_result;
8567#endif /* __MIG_check__Request__io_object_get_bundle_identifier_t__defined */
8568
8569#if __MigKernelSpecificCode
8570#else
8571#endif /* __MigKernelSpecificCode */
8572 __DeclareRcvRpc(2861, "io_object_get_bundle_identifier")
8573 __BeforeRcvRpc(2861, "io_object_get_bundle_identifier")
8574
8575#if defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined)
8576 check_result = __MIG_check__Request__io_object_get_bundle_identifier_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
8577 if (check_result != MACH_MSG_SUCCESS)
8578 { MIG_RETURN_ERROR(OutKP, check_result); }
8579#endif /* defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined) */
8580
8581 OutUP->RetCode = is_io_object_get_bundle_identifier(main_port: InKP->Head.msgh_request_port, obj_name: In0UP->obj_name, class_name: OutUP->class_name);
8582 if (OutUP->RetCode != KERN_SUCCESS) {
8583 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
8584 }
8585#if __MigKernelSpecificCode
8586#endif /* __MigKernelSpecificCode */
8587
8588 OutUP->NDR = NDR_record;
8589
8590#ifdef __LP64__
8591 {
8592 size_t strLength = strlen(s: OutUP->class_name) + 1;
8593 if (strLength > 0xffffffff)
8594 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
8595 OutUP->class_nameCnt = (mach_msg_type_number_t) strLength;
8596 }
8597#else
8598 OutUP->class_nameCnt = (mach_msg_type_number_t) strlen(OutUP->class_name) + 1;
8599#endif /* __LP64__ */
8600 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutUP->class_nameCnt + 3) & ~3));
8601
8602 __AfterRcvRpc(2861, "io_object_get_bundle_identifier")
8603}
8604
8605#if ( __MigTypeCheck )
8606#if __MIG_check__Request__iokit_subsystem__
8607#if !defined(__MIG_check__Request__io_service_open_extended_t__defined)
8608#define __MIG_check__Request__io_service_open_extended_t__defined
8609
8610mig_internal kern_return_t __MIG_check__Request__io_service_open_extended_t(
8611 __attribute__((__unused__)) __RequestKData__io_service_open_extended_t *InKP,
8612 __attribute__((__unused__)) __RequestUData__io_service_open_extended_t *In0UP,
8613 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
8614{
8615
8616 typedef __Request__io_service_open_extended_t __Request;
8617 typedef __RequestUData__io_service_open_extended_t __RequestU __attribute__((unused));
8618#if __MigTypeCheck
8619 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
8620 (InKP->msgh_body.msgh_descriptor_count != 2) ||
8621 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
8622 return MIG_BAD_ARGUMENTS;
8623#endif /* __MigTypeCheck */
8624
8625#if __MigTypeCheck
8626 if (InKP->owningTask.type != MACH_MSG_PORT_DESCRIPTOR ||
8627 InKP->owningTask.disposition != 17)
8628 return MIG_TYPE_ERROR;
8629#endif /* __MigTypeCheck */
8630
8631#if __MigTypeCheck
8632 if (InKP->properties.type != MACH_MSG_OOL_DESCRIPTOR)
8633 return MIG_TYPE_ERROR;
8634#endif /* __MigTypeCheck */
8635
8636#if __MigTypeCheck
8637 if (InKP->properties.size != In0UP->propertiesCnt)
8638 return MIG_TYPE_ERROR;
8639#endif /* __MigTypeCheck */
8640
8641 return MACH_MSG_SUCCESS;
8642}
8643#endif /* !defined(__MIG_check__Request__io_service_open_extended_t__defined) */
8644#endif /* __MIG_check__Request__iokit_subsystem__ */
8645#endif /* ( __MigTypeCheck ) */
8646
8647
8648/* Routine io_service_open_extended */
8649mig_internal novalue _Xio_service_open_extended
8650 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
8651 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8652 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
8653{
8654
8655#ifdef __MigPackStructs
8656#pragma pack(push, 4)
8657#endif
8658 typedef struct {
8659 NDR_record_t NDR;
8660 uint32_t connect_type;
8661 NDR_record_t ndr;
8662 mach_msg_type_number_t propertiesCnt;
8663 mach_msg_trailer_t trailer;
8664 char padding[0]; /* Avoid generating empty UData structs */
8665 } RequestU __attribute__((unused));
8666#ifdef __MigPackStructs
8667#pragma pack(pop)
8668#endif
8669 typedef __RequestKData__io_service_open_extended_t RequestK;
8670 typedef __RequestUData__io_service_open_extended_t __RequestU;
8671 typedef __ReplyKData__io_service_open_extended_t ReplyK __attribute__((unused));
8672 typedef __ReplyUData__io_service_open_extended_t ReplyU __attribute__((unused));
8673 typedef __Reply__io_service_open_extended_t Reply __attribute__((unused));
8674 typedef __Request__io_service_open_extended_t __Request __attribute__((unused));
8675
8676 /*
8677 * typedef struct {
8678 * mach_msg_header_t Head;
8679 * NDR_record_t NDR;
8680 * kern_return_t RetCode;
8681 * } mig_reply_error_t;
8682 */
8683
8684 RequestK *InKP = (RequestK *) InHeadP;
8685 RequestU *In0UP = (RequestU *) InDataP;
8686 ReplyK *OutKP = (ReplyK *) OutHeadP;
8687 ReplyU *OutUP = (ReplyU *) OutDataP;
8688 (void)OutUP;
8689#ifdef __MIG_check__Request__io_service_open_extended_t__defined
8690 kern_return_t check_result;
8691#endif /* __MIG_check__Request__io_service_open_extended_t__defined */
8692
8693#if __MigKernelSpecificCode
8694#if UseStaticTemplates
8695 const static mach_msg_port_descriptor_t connectionTemplate = {
8696 /* name = */ MACH_PORT_NULL,
8697 /* pad1 = */ 0,
8698 /* pad2 = */ 0,
8699 /* disp = */ 17,
8700 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
8701 };
8702#endif /* UseStaticTemplates */
8703
8704#else
8705#if UseStaticTemplates
8706 const static mach_msg_port_descriptor_t connectionTemplate = {
8707 /* name = */ MACH_PORT_NULL,
8708 /* pad1 = */ 0,
8709 /* pad2 = */ 0,
8710 /* disp = */ 19,
8711 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
8712 };
8713#endif /* UseStaticTemplates */
8714
8715#endif /* __MigKernelSpecificCode */
8716 kern_return_t RetCode;
8717 io_object_t service;
8718 task_t owningTask;
8719 io_connect_t connection;
8720
8721 __DeclareRcvRpc(2862, "io_service_open_extended")
8722 __BeforeRcvRpc(2862, "io_service_open_extended")
8723
8724#if defined(__MIG_check__Request__io_service_open_extended_t__defined)
8725 check_result = __MIG_check__Request__io_service_open_extended_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
8726 if (check_result != MACH_MSG_SUCCESS)
8727 { MIG_RETURN_ERROR(OutKP, check_result); }
8728#endif /* defined(__MIG_check__Request__io_service_open_extended_t__defined) */
8729
8730#if UseStaticTemplates
8731 OutKP->connection = connectionTemplate;
8732#else /* UseStaticTemplates */
8733#if __MigKernelSpecificCode
8734 OutKP->connection.disposition = 17;
8735#else
8736 OutKP->connection.disposition = 19;
8737#endif /* __MigKernelSpecificCode */
8738#if !(defined(KERNEL) && defined(__LP64__))
8739 OutKP->connection.pad1 = 0;
8740#endif
8741 OutKP->connection.pad2 = 0;
8742 OutKP->connection.type = MACH_MSG_PORT_DESCRIPTOR;
8743#if defined(KERNEL)
8744 OutKP->connection.pad_end = 0;
8745#endif
8746#endif /* UseStaticTemplates */
8747
8748
8749 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
8750
8751 owningTask = convert_port_to_task_mig(port: InKP->owningTask.name);
8752
8753 RetCode = is_io_service_open_extended(service, owningTask, connect_type: In0UP->connect_type, ndr: In0UP->ndr, properties: (io_buf_ptr_t)(InKP->properties.address), propertiesCnt: InKP->properties.size, result: &OutUP->result, connection: &connection);
8754 task_deallocate_mig(owningTask);
8755 iokit_remove_reference(obj: service);
8756 if (RetCode != KERN_SUCCESS) {
8757 MIG_RETURN_ERROR(OutKP, RetCode);
8758 }
8759#if __MigKernelSpecificCode
8760 ipc_port_release_send(port: (ipc_port_t)InKP->owningTask.name);
8761#endif /* __MigKernelSpecificCode */
8762 OutKP->connection.name = (mach_port_t)iokit_make_connect_port(obj: connection);
8763
8764
8765 OutUP->NDR = NDR_record;
8766
8767
8768 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
8769 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
8770 OutKP->msgh_body.msgh_descriptor_count = 1;
8771 __AfterRcvRpc(2862, "io_service_open_extended")
8772}
8773
8774#if ( __MigTypeCheck )
8775#if __MIG_check__Request__iokit_subsystem__
8776#if !defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined)
8777#define __MIG_check__Request__io_connect_map_memory_into_task_t__defined
8778
8779mig_internal kern_return_t __MIG_check__Request__io_connect_map_memory_into_task_t(
8780 __attribute__((__unused__)) __RequestKData__io_connect_map_memory_into_task_t *InKP,
8781 __attribute__((__unused__)) __RequestUData__io_connect_map_memory_into_task_t *In0UP,
8782 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
8783{
8784
8785 typedef __Request__io_connect_map_memory_into_task_t __Request;
8786 typedef __RequestUData__io_connect_map_memory_into_task_t __RequestU __attribute__((unused));
8787#if __MigTypeCheck
8788 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
8789 (InKP->msgh_body.msgh_descriptor_count != 1) ||
8790 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
8791 return MIG_BAD_ARGUMENTS;
8792#endif /* __MigTypeCheck */
8793
8794#if __MigTypeCheck
8795 if (InKP->into_task.type != MACH_MSG_PORT_DESCRIPTOR ||
8796 InKP->into_task.disposition != 17)
8797 return MIG_TYPE_ERROR;
8798#endif /* __MigTypeCheck */
8799
8800 return MACH_MSG_SUCCESS;
8801}
8802#endif /* !defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined) */
8803#endif /* __MIG_check__Request__iokit_subsystem__ */
8804#endif /* ( __MigTypeCheck ) */
8805
8806
8807/* Routine io_connect_map_memory_into_task */
8808mig_internal novalue _Xio_connect_map_memory_into_task
8809 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
8810 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8811 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
8812{
8813
8814#ifdef __MigPackStructs
8815#pragma pack(push, 4)
8816#endif
8817 typedef struct {
8818 NDR_record_t NDR;
8819 uint32_t memory_type;
8820 mach_vm_address_t address;
8821 mach_vm_size_t size;
8822 uint32_t flags;
8823 mach_msg_trailer_t trailer;
8824 char padding[0]; /* Avoid generating empty UData structs */
8825 } RequestU __attribute__((unused));
8826#ifdef __MigPackStructs
8827#pragma pack(pop)
8828#endif
8829 typedef __RequestKData__io_connect_map_memory_into_task_t RequestK;
8830 typedef __RequestUData__io_connect_map_memory_into_task_t __RequestU;
8831 typedef __ReplyKData__io_connect_map_memory_into_task_t ReplyK __attribute__((unused));
8832 typedef __ReplyUData__io_connect_map_memory_into_task_t ReplyU __attribute__((unused));
8833 typedef __Reply__io_connect_map_memory_into_task_t Reply __attribute__((unused));
8834 typedef __Request__io_connect_map_memory_into_task_t __Request __attribute__((unused));
8835
8836 /*
8837 * typedef struct {
8838 * mach_msg_header_t Head;
8839 * NDR_record_t NDR;
8840 * kern_return_t RetCode;
8841 * } mig_reply_error_t;
8842 */
8843
8844 RequestK *InKP = (RequestK *) InHeadP;
8845 RequestU *In0UP = (RequestU *) InDataP;
8846 ReplyK *OutKP = (ReplyK *) OutHeadP;
8847 ReplyU *OutUP = (ReplyU *) OutDataP;
8848 (void)OutUP;
8849#ifdef __MIG_check__Request__io_connect_map_memory_into_task_t__defined
8850 kern_return_t check_result;
8851#endif /* __MIG_check__Request__io_connect_map_memory_into_task_t__defined */
8852
8853#if __MigKernelSpecificCode
8854#else
8855#endif /* __MigKernelSpecificCode */
8856 io_connect_t connection;
8857 task_t into_task;
8858
8859 __DeclareRcvRpc(2863, "io_connect_map_memory_into_task")
8860 __BeforeRcvRpc(2863, "io_connect_map_memory_into_task")
8861
8862#if defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined)
8863 check_result = __MIG_check__Request__io_connect_map_memory_into_task_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
8864 if (check_result != MACH_MSG_SUCCESS)
8865 { MIG_RETURN_ERROR(OutKP, check_result); }
8866#endif /* defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined) */
8867
8868 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
8869
8870 into_task = convert_port_to_task_mig(port: InKP->into_task.name);
8871
8872 OutUP->RetCode = is_io_connect_map_memory_into_task(connection, memory_type: In0UP->memory_type, into_task, address: &In0UP->address, size: &In0UP->size, flags: In0UP->flags);
8873 task_deallocate_mig(into_task);
8874 iokit_remove_connect_reference(obj: connection);
8875 if (OutUP->RetCode != KERN_SUCCESS) {
8876 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
8877 }
8878#if __MigKernelSpecificCode
8879 ipc_port_release_send(port: (ipc_port_t)InKP->into_task.name);
8880#endif /* __MigKernelSpecificCode */
8881
8882 OutUP->NDR = NDR_record;
8883
8884
8885 OutUP->address = In0UP->address;
8886
8887 OutUP->size = In0UP->size;
8888
8889 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
8890 __AfterRcvRpc(2863, "io_connect_map_memory_into_task")
8891}
8892
8893#if ( __MigTypeCheck )
8894#if __MIG_check__Request__iokit_subsystem__
8895#if !defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined)
8896#define __MIG_check__Request__io_connect_unmap_memory_from_task_t__defined
8897
8898mig_internal kern_return_t __MIG_check__Request__io_connect_unmap_memory_from_task_t(
8899 __attribute__((__unused__)) __RequestKData__io_connect_unmap_memory_from_task_t *InKP,
8900 __attribute__((__unused__)) __RequestUData__io_connect_unmap_memory_from_task_t *In0UP,
8901 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
8902{
8903
8904 typedef __Request__io_connect_unmap_memory_from_task_t __Request;
8905 typedef __RequestUData__io_connect_unmap_memory_from_task_t __RequestU __attribute__((unused));
8906#if __MigTypeCheck
8907 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
8908 (InKP->msgh_body.msgh_descriptor_count != 1) ||
8909 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
8910 return MIG_BAD_ARGUMENTS;
8911#endif /* __MigTypeCheck */
8912
8913#if __MigTypeCheck
8914 if (InKP->from_task.type != MACH_MSG_PORT_DESCRIPTOR ||
8915 InKP->from_task.disposition != 17)
8916 return MIG_TYPE_ERROR;
8917#endif /* __MigTypeCheck */
8918
8919 return MACH_MSG_SUCCESS;
8920}
8921#endif /* !defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined) */
8922#endif /* __MIG_check__Request__iokit_subsystem__ */
8923#endif /* ( __MigTypeCheck ) */
8924
8925
8926/* Routine io_connect_unmap_memory_from_task */
8927mig_internal novalue _Xio_connect_unmap_memory_from_task
8928 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
8929 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
8930 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
8931{
8932
8933#ifdef __MigPackStructs
8934#pragma pack(push, 4)
8935#endif
8936 typedef struct {
8937 NDR_record_t NDR;
8938 uint32_t memory_type;
8939 mach_vm_address_t address;
8940 mach_msg_trailer_t trailer;
8941 char padding[0]; /* Avoid generating empty UData structs */
8942 } RequestU __attribute__((unused));
8943#ifdef __MigPackStructs
8944#pragma pack(pop)
8945#endif
8946 typedef __RequestKData__io_connect_unmap_memory_from_task_t RequestK;
8947 typedef __RequestUData__io_connect_unmap_memory_from_task_t __RequestU;
8948 typedef __ReplyKData__io_connect_unmap_memory_from_task_t ReplyK __attribute__((unused));
8949 typedef __ReplyUData__io_connect_unmap_memory_from_task_t ReplyU __attribute__((unused));
8950 typedef __Reply__io_connect_unmap_memory_from_task_t Reply __attribute__((unused));
8951 typedef __Request__io_connect_unmap_memory_from_task_t __Request __attribute__((unused));
8952
8953 /*
8954 * typedef struct {
8955 * mach_msg_header_t Head;
8956 * NDR_record_t NDR;
8957 * kern_return_t RetCode;
8958 * } mig_reply_error_t;
8959 */
8960
8961 RequestK *InKP = (RequestK *) InHeadP;
8962 RequestU *In0UP = (RequestU *) InDataP;
8963 ReplyK *OutKP = (ReplyK *) OutHeadP;
8964 ReplyU *OutUP = (ReplyU *) OutDataP;
8965 (void)OutUP;
8966#ifdef __MIG_check__Request__io_connect_unmap_memory_from_task_t__defined
8967 kern_return_t check_result;
8968#endif /* __MIG_check__Request__io_connect_unmap_memory_from_task_t__defined */
8969
8970#if __MigKernelSpecificCode
8971#else
8972#endif /* __MigKernelSpecificCode */
8973 io_connect_t connection;
8974 task_t from_task;
8975
8976 __DeclareRcvRpc(2864, "io_connect_unmap_memory_from_task")
8977 __BeforeRcvRpc(2864, "io_connect_unmap_memory_from_task")
8978
8979#if defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined)
8980 check_result = __MIG_check__Request__io_connect_unmap_memory_from_task_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
8981 if (check_result != MACH_MSG_SUCCESS)
8982 { MIG_RETURN_ERROR(OutKP, check_result); }
8983#endif /* defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined) */
8984
8985 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
8986
8987 from_task = convert_port_to_task_mig(port: InKP->from_task.name);
8988
8989 OutUP->RetCode = is_io_connect_unmap_memory_from_task(connection, memory_type: In0UP->memory_type, from_task, address: In0UP->address);
8990 task_deallocate_mig(from_task);
8991 iokit_remove_connect_reference(obj: connection);
8992#if __MigKernelSpecificCode
8993 if (OutUP->RetCode != KERN_SUCCESS) {
8994 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
8995 }
8996 ipc_port_release_send(port: (ipc_port_t)InKP->from_task.name);
8997#endif /* __MigKernelSpecificCode */
8998
8999 OutUP->NDR = NDR_record;
9000
9001
9002 __AfterRcvRpc(2864, "io_connect_unmap_memory_from_task")
9003}
9004
9005#if ( __MigTypeCheck )
9006#if __MIG_check__Request__iokit_subsystem__
9007#if !defined(__MIG_check__Request__io_connect_method_t__defined)
9008#define __MIG_check__Request__io_connect_method_t__defined
9009
9010mig_internal kern_return_t __MIG_check__Request__io_connect_method_t(
9011 __attribute__((__unused__)) __RequestKData__io_connect_method_t *InKP,
9012 __attribute__((__unused__)) __RequestUData__io_connect_method_t *In0UP,
9013 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9014 __attribute__((__unused__)) __RequestUData__io_connect_method_t **In1UPP,
9015 __attribute__((__unused__)) __RequestUData__io_connect_method_t **In2UPP)
9016{
9017
9018 typedef __Request__io_connect_method_t __Request;
9019 typedef __RequestUData__io_connect_method_t __RequestU __attribute__((unused));
9020 __RequestU *In1UP;
9021 __RequestU *In2UP;
9022#if __MigTypeCheck
9023 unsigned int msgh_size;
9024#endif /* __MigTypeCheck */
9025 unsigned int msgh_size_delta;
9026
9027#if __MigTypeCheck
9028 msgh_size = InKP->Head.msgh_size;
9029 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
9030 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
9031 return MIG_BAD_ARGUMENTS;
9032#endif /* __MigTypeCheck */
9033
9034#if defined(__NDR_convert__int_rep__Request__io_connect_method_t__scalar_inputCnt__defined)
9035 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9036 __NDR_convert__int_rep__Request__io_connect_method_t__scalar_inputCnt(&In0UP->scalar_inputCnt, In0UP->NDR.int_rep);
9037#endif /* __NDR_convert__int_rep__Request__io_connect_method_t__scalar_inputCnt__defined */
9038 msgh_size_delta = (8 * In0UP->scalar_inputCnt);
9039#if __MigTypeCheck
9040 if (In0UP->scalar_inputCnt > 16)
9041 return MIG_BAD_ARGUMENTS;
9042 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) / 8 < In0UP->scalar_inputCnt) ||
9043 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224) + (8 * In0UP->scalar_inputCnt)))
9044 return MIG_BAD_ARGUMENTS;
9045 msgh_size -= msgh_size_delta;
9046#endif /* __MigTypeCheck */
9047
9048 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
9049
9050#if defined(__NDR_convert__int_rep__Request__io_connect_method_t__inband_inputCnt__defined)
9051 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9052 __NDR_convert__int_rep__Request__io_connect_method_t__inband_inputCnt(&In1UP->inband_inputCnt, In1UP->NDR.int_rep);
9053#endif /* __NDR_convert__int_rep__Request__io_connect_method_t__inband_inputCnt__defined */
9054 msgh_size_delta = _WALIGN_(In1UP->inband_inputCnt);
9055#if __MigTypeCheck
9056 if (In1UP->inband_inputCnt > 4096)
9057 return MIG_BAD_ARGUMENTS;
9058 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) < In1UP->inband_inputCnt) ||
9059 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4224) + _WALIGN_(In1UP->inband_inputCnt)))
9060 return MIG_BAD_ARGUMENTS;
9061#endif /* __MigTypeCheck */
9062
9063 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 4096);
9064
9065 return MACH_MSG_SUCCESS;
9066}
9067#endif /* !defined(__MIG_check__Request__io_connect_method_t__defined) */
9068#endif /* __MIG_check__Request__iokit_subsystem__ */
9069#endif /* ( __MigTypeCheck ) */
9070
9071
9072/* Routine io_connect_method */
9073mig_internal novalue _Xio_connect_method
9074 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
9075 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9076 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
9077{
9078
9079#ifdef __MigPackStructs
9080#pragma pack(push, 4)
9081#endif
9082 typedef struct {
9083 NDR_record_t NDR;
9084 uint32_t selector;
9085 mach_msg_type_number_t scalar_inputCnt;
9086 io_user_scalar_t scalar_input[16];
9087 mach_msg_type_number_t inband_inputCnt;
9088 char inband_input[4096];
9089 mach_vm_address_t ool_input;
9090 mach_vm_size_t ool_input_size;
9091 mach_msg_type_number_t inband_outputCnt;
9092 mach_msg_type_number_t scalar_outputCnt;
9093 mach_vm_address_t ool_output;
9094 mach_vm_size_t ool_output_size;
9095 mach_msg_trailer_t trailer;
9096 char padding[0]; /* Avoid generating empty UData structs */
9097 } RequestU __attribute__((unused));
9098#ifdef __MigPackStructs
9099#pragma pack(pop)
9100#endif
9101 typedef __RequestKData__io_connect_method_t RequestK;
9102 typedef __RequestUData__io_connect_method_t __RequestU;
9103 typedef __ReplyKData__io_connect_method_t ReplyK __attribute__((unused));
9104 typedef __ReplyUData__io_connect_method_t ReplyU __attribute__((unused));
9105 typedef __Reply__io_connect_method_t Reply __attribute__((unused));
9106 typedef __Request__io_connect_method_t __Request __attribute__((unused));
9107
9108 /*
9109 * typedef struct {
9110 * mach_msg_header_t Head;
9111 * NDR_record_t NDR;
9112 * kern_return_t RetCode;
9113 * } mig_reply_error_t;
9114 */
9115
9116 RequestK *InKP = (RequestK *) InHeadP;
9117 RequestU *In0UP = (RequestU *) InDataP;
9118 RequestU *In1UP;
9119 RequestU *In2UP;
9120 ReplyK *OutKP = (ReplyK *) OutHeadP;
9121 ReplyU *OutUP = (ReplyU *) OutDataP;
9122 (void)OutUP;
9123 unsigned int msgh_size;
9124 unsigned int msgh_size_delta;
9125
9126#ifdef __MIG_check__Request__io_connect_method_t__defined
9127 kern_return_t check_result;
9128#endif /* __MIG_check__Request__io_connect_method_t__defined */
9129
9130#if __MigKernelSpecificCode
9131#else
9132#endif /* __MigKernelSpecificCode */
9133 io_connect_t connection;
9134 io_user_scalar_t scalar_output[16];
9135 mach_msg_type_number_t scalar_outputCnt;
9136
9137 __DeclareRcvRpc(2865, "io_connect_method")
9138 __BeforeRcvRpc(2865, "io_connect_method")
9139
9140#if defined(__MIG_check__Request__io_connect_method_t__defined)
9141 check_result = __MIG_check__Request__io_connect_method_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
9142 if (check_result != MACH_MSG_SUCCESS)
9143 { MIG_RETURN_ERROR(OutKP, check_result); }
9144#endif /* defined(__MIG_check__Request__io_connect_method_t__defined) */
9145
9146 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
9147
9148 OutUP->inband_outputCnt = 4096;
9149 if (In2UP->inband_outputCnt < OutUP->inband_outputCnt)
9150 OutUP->inband_outputCnt = In2UP->inband_outputCnt;
9151
9152 scalar_outputCnt = 16;
9153 if (In2UP->scalar_outputCnt < scalar_outputCnt)
9154 scalar_outputCnt = In2UP->scalar_outputCnt;
9155
9156 OutUP->RetCode = is_io_connect_method(connection, selector: In0UP->selector, scalar_input: In0UP->scalar_input, scalar_inputCnt: In0UP->scalar_inputCnt, inband_input: In1UP->inband_input, inband_inputCnt: In1UP->inband_inputCnt, ool_input: In2UP->ool_input, ool_input_size: In2UP->ool_input_size, inband_output: OutUP->inband_output, inband_outputCnt: &OutUP->inband_outputCnt, scalar_output, scalar_outputCnt: &scalar_outputCnt, ool_output: In2UP->ool_output, ool_output_size: &In2UP->ool_output_size);
9157 iokit_remove_connect_reference(obj: connection);
9158 if (OutUP->RetCode != KERN_SUCCESS) {
9159 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
9160 }
9161#if __MigKernelSpecificCode
9162#endif /* __MigKernelSpecificCode */
9163
9164 OutUP->NDR = NDR_record;
9165
9166 msgh_size_delta = _WALIGN_((OutUP->inband_outputCnt + 3) & ~3);
9167 msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4224) + msgh_size_delta;
9168 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 4096);
9169 (void)memcpy(dst: (char *) OutUP->scalar_output, src: (const char *) scalar_output, n: 8 * scalar_outputCnt);
9170 OutUP->scalar_outputCnt = scalar_outputCnt;
9171 msgh_size_delta = ((8 * scalar_outputCnt));
9172 msgh_size += msgh_size_delta;
9173 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
9174
9175 OutUP->ool_output_size = In2UP->ool_output_size;
9176
9177 OutKP->Head.msgh_size = msgh_size;
9178 __AfterRcvRpc(2865, "io_connect_method")
9179}
9180
9181#if ( __MigTypeCheck )
9182#if __MIG_check__Request__iokit_subsystem__
9183#if !defined(__MIG_check__Request__io_connect_async_method_t__defined)
9184#define __MIG_check__Request__io_connect_async_method_t__defined
9185
9186mig_internal kern_return_t __MIG_check__Request__io_connect_async_method_t(
9187 __attribute__((__unused__)) __RequestKData__io_connect_async_method_t *InKP,
9188 __attribute__((__unused__)) __RequestUData__io_connect_async_method_t *In0UP,
9189 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9190 __attribute__((__unused__)) __RequestUData__io_connect_async_method_t **In1UPP,
9191 __attribute__((__unused__)) __RequestUData__io_connect_async_method_t **In2UPP,
9192 __attribute__((__unused__)) __RequestUData__io_connect_async_method_t **In3UPP)
9193{
9194
9195 typedef __Request__io_connect_async_method_t __Request;
9196 typedef __RequestUData__io_connect_async_method_t __RequestU __attribute__((unused));
9197 __RequestU *In1UP;
9198 __RequestU *In2UP;
9199 __RequestU *In3UP;
9200#if __MigTypeCheck
9201 unsigned int msgh_size;
9202#endif /* __MigTypeCheck */
9203 unsigned int msgh_size_delta;
9204
9205#if __MigTypeCheck
9206 msgh_size = InKP->Head.msgh_size;
9207 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
9208 (InKP->msgh_body.msgh_descriptor_count != 1) ||
9209 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
9210 return MIG_BAD_ARGUMENTS;
9211#endif /* __MigTypeCheck */
9212
9213#if __MigTypeCheck
9214 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
9215 InKP->wake_port.disposition != 17)
9216 return MIG_TYPE_ERROR;
9217#endif /* __MigTypeCheck */
9218
9219#if defined(__NDR_convert__int_rep__Request__io_connect_async_method_t__referenceCnt__defined)
9220 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9221 __NDR_convert__int_rep__Request__io_connect_async_method_t__referenceCnt(&In0UP->referenceCnt, In0UP->NDR.int_rep);
9222#endif /* __NDR_convert__int_rep__Request__io_connect_async_method_t__referenceCnt__defined */
9223 msgh_size_delta = (8 * In0UP->referenceCnt);
9224#if __MigTypeCheck
9225 if (In0UP->referenceCnt > 8)
9226 return MIG_BAD_ARGUMENTS;
9227 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) / 8 < In0UP->referenceCnt) ||
9228 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + (8 * In0UP->referenceCnt)))
9229 return MIG_BAD_ARGUMENTS;
9230 msgh_size -= msgh_size_delta;
9231#endif /* __MigTypeCheck */
9232
9233 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 64);
9234
9235#if defined(__NDR_convert__int_rep__Request__io_connect_async_method_t__scalar_inputCnt__defined)
9236 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9237 __NDR_convert__int_rep__Request__io_connect_async_method_t__scalar_inputCnt(&In1UP->scalar_inputCnt, In1UP->NDR.int_rep);
9238#endif /* __NDR_convert__int_rep__Request__io_connect_async_method_t__scalar_inputCnt__defined */
9239 msgh_size_delta = (8 * In1UP->scalar_inputCnt);
9240#if __MigTypeCheck
9241 if (In1UP->scalar_inputCnt > 16)
9242 return MIG_BAD_ARGUMENTS;
9243 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) / 8 < In1UP->scalar_inputCnt) ||
9244 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + (8 * In1UP->scalar_inputCnt)))
9245 return MIG_BAD_ARGUMENTS;
9246 msgh_size -= msgh_size_delta;
9247#endif /* __MigTypeCheck */
9248
9249 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 128);
9250
9251#if defined(__NDR_convert__int_rep__Request__io_connect_async_method_t__inband_inputCnt__defined)
9252 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9253 __NDR_convert__int_rep__Request__io_connect_async_method_t__inband_inputCnt(&In2UP->inband_inputCnt, In2UP->NDR.int_rep);
9254#endif /* __NDR_convert__int_rep__Request__io_connect_async_method_t__inband_inputCnt__defined */
9255 msgh_size_delta = _WALIGN_(In2UP->inband_inputCnt);
9256#if __MigTypeCheck
9257 if (In2UP->inband_inputCnt > 4096)
9258 return MIG_BAD_ARGUMENTS;
9259 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) < In2UP->inband_inputCnt) ||
9260 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4288) + _WALIGN_(In2UP->inband_inputCnt)))
9261 return MIG_BAD_ARGUMENTS;
9262#endif /* __MigTypeCheck */
9263
9264 *In3UPP = In3UP = (__RequestU *) ((pointer_t) In2UP + msgh_size_delta - 4096);
9265
9266 return MACH_MSG_SUCCESS;
9267}
9268#endif /* !defined(__MIG_check__Request__io_connect_async_method_t__defined) */
9269#endif /* __MIG_check__Request__iokit_subsystem__ */
9270#endif /* ( __MigTypeCheck ) */
9271
9272
9273/* Routine io_connect_async_method */
9274mig_internal novalue _Xio_connect_async_method
9275 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
9276 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9277 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
9278{
9279
9280#ifdef __MigPackStructs
9281#pragma pack(push, 4)
9282#endif
9283 typedef struct {
9284 NDR_record_t NDR;
9285 mach_msg_type_number_t referenceCnt;
9286 io_user_reference_t reference[8];
9287 uint32_t selector;
9288 mach_msg_type_number_t scalar_inputCnt;
9289 io_user_scalar_t scalar_input[16];
9290 mach_msg_type_number_t inband_inputCnt;
9291 char inband_input[4096];
9292 mach_vm_address_t ool_input;
9293 mach_vm_size_t ool_input_size;
9294 mach_msg_type_number_t inband_outputCnt;
9295 mach_msg_type_number_t scalar_outputCnt;
9296 mach_vm_address_t ool_output;
9297 mach_vm_size_t ool_output_size;
9298 mach_msg_trailer_t trailer;
9299 char padding[0]; /* Avoid generating empty UData structs */
9300 } RequestU __attribute__((unused));
9301#ifdef __MigPackStructs
9302#pragma pack(pop)
9303#endif
9304 typedef __RequestKData__io_connect_async_method_t RequestK;
9305 typedef __RequestUData__io_connect_async_method_t __RequestU;
9306 typedef __ReplyKData__io_connect_async_method_t ReplyK __attribute__((unused));
9307 typedef __ReplyUData__io_connect_async_method_t ReplyU __attribute__((unused));
9308 typedef __Reply__io_connect_async_method_t Reply __attribute__((unused));
9309 typedef __Request__io_connect_async_method_t __Request __attribute__((unused));
9310
9311 /*
9312 * typedef struct {
9313 * mach_msg_header_t Head;
9314 * NDR_record_t NDR;
9315 * kern_return_t RetCode;
9316 * } mig_reply_error_t;
9317 */
9318
9319 RequestK *InKP = (RequestK *) InHeadP;
9320 RequestU *In0UP = (RequestU *) InDataP;
9321 RequestU *In1UP;
9322 RequestU *In2UP;
9323 RequestU *In3UP;
9324 ReplyK *OutKP = (ReplyK *) OutHeadP;
9325 ReplyU *OutUP = (ReplyU *) OutDataP;
9326 (void)OutUP;
9327 unsigned int msgh_size;
9328 unsigned int msgh_size_delta;
9329
9330#ifdef __MIG_check__Request__io_connect_async_method_t__defined
9331 kern_return_t check_result;
9332#endif /* __MIG_check__Request__io_connect_async_method_t__defined */
9333
9334#if __MigKernelSpecificCode
9335#else
9336#endif /* __MigKernelSpecificCode */
9337 io_connect_t connection;
9338 io_user_scalar_t scalar_output[16];
9339 mach_msg_type_number_t scalar_outputCnt;
9340
9341 __DeclareRcvRpc(2866, "io_connect_async_method")
9342 __BeforeRcvRpc(2866, "io_connect_async_method")
9343
9344#if defined(__MIG_check__Request__io_connect_async_method_t__defined)
9345 check_result = __MIG_check__Request__io_connect_async_method_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP, In3UPP: (__RequestU **)&In3UP);
9346 if (check_result != MACH_MSG_SUCCESS)
9347 { MIG_RETURN_ERROR(OutKP, check_result); }
9348#endif /* defined(__MIG_check__Request__io_connect_async_method_t__defined) */
9349
9350 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
9351
9352 OutUP->inband_outputCnt = 4096;
9353 if (In3UP->inband_outputCnt < OutUP->inband_outputCnt)
9354 OutUP->inband_outputCnt = In3UP->inband_outputCnt;
9355
9356 scalar_outputCnt = 16;
9357 if (In3UP->scalar_outputCnt < scalar_outputCnt)
9358 scalar_outputCnt = In3UP->scalar_outputCnt;
9359
9360 OutUP->RetCode = is_io_connect_async_method(connection, wake_port: InKP->wake_port.name, reference: In0UP->reference, referenceCnt: In0UP->referenceCnt, selector: In1UP->selector, scalar_input: In1UP->scalar_input, scalar_inputCnt: In1UP->scalar_inputCnt, inband_input: In2UP->inband_input, inband_inputCnt: In2UP->inband_inputCnt, ool_input: In3UP->ool_input, ool_input_size: In3UP->ool_input_size, inband_output: OutUP->inband_output, inband_outputCnt: &OutUP->inband_outputCnt, scalar_output, scalar_outputCnt: &scalar_outputCnt, ool_output: In3UP->ool_output, ool_output_size: &In3UP->ool_output_size);
9361 iokit_remove_connect_reference(obj: connection);
9362 if (OutUP->RetCode != KERN_SUCCESS) {
9363 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
9364 }
9365#if __MigKernelSpecificCode
9366#endif /* __MigKernelSpecificCode */
9367
9368 OutUP->NDR = NDR_record;
9369
9370 msgh_size_delta = _WALIGN_((OutUP->inband_outputCnt + 3) & ~3);
9371 msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4224) + msgh_size_delta;
9372 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 4096);
9373 (void)memcpy(dst: (char *) OutUP->scalar_output, src: (const char *) scalar_output, n: 8 * scalar_outputCnt);
9374 OutUP->scalar_outputCnt = scalar_outputCnt;
9375 msgh_size_delta = ((8 * scalar_outputCnt));
9376 msgh_size += msgh_size_delta;
9377 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
9378
9379 OutUP->ool_output_size = In3UP->ool_output_size;
9380
9381 OutKP->Head.msgh_size = msgh_size;
9382 __AfterRcvRpc(2866, "io_connect_async_method")
9383}
9384
9385#if ( __MigTypeCheck )
9386#if __MIG_check__Request__iokit_subsystem__
9387#if !defined(__MIG_check__Request__io_connect_set_notification_port_64_t__defined)
9388#define __MIG_check__Request__io_connect_set_notification_port_64_t__defined
9389
9390mig_internal kern_return_t __MIG_check__Request__io_connect_set_notification_port_64_t(
9391 __attribute__((__unused__)) __RequestKData__io_connect_set_notification_port_64_t *InKP,
9392 __attribute__((__unused__)) __RequestUData__io_connect_set_notification_port_64_t *In0UP,
9393 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
9394{
9395
9396 typedef __Request__io_connect_set_notification_port_64_t __Request;
9397 typedef __RequestUData__io_connect_set_notification_port_64_t __RequestU __attribute__((unused));
9398#if __MigTypeCheck
9399 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
9400 (InKP->msgh_body.msgh_descriptor_count != 1) ||
9401 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
9402 return MIG_BAD_ARGUMENTS;
9403#endif /* __MigTypeCheck */
9404
9405#if __MigTypeCheck
9406 if (InKP->port.type != MACH_MSG_PORT_DESCRIPTOR ||
9407 InKP->port.disposition != 17)
9408 return MIG_TYPE_ERROR;
9409#endif /* __MigTypeCheck */
9410
9411 return MACH_MSG_SUCCESS;
9412}
9413#endif /* !defined(__MIG_check__Request__io_connect_set_notification_port_64_t__defined) */
9414#endif /* __MIG_check__Request__iokit_subsystem__ */
9415#endif /* ( __MigTypeCheck ) */
9416
9417
9418/* Routine io_connect_set_notification_port_64 */
9419mig_internal novalue _Xio_connect_set_notification_port_64
9420 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
9421 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9422 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
9423{
9424
9425#ifdef __MigPackStructs
9426#pragma pack(push, 4)
9427#endif
9428 typedef struct {
9429 NDR_record_t NDR;
9430 uint32_t notification_type;
9431 io_user_reference_t reference;
9432 mach_msg_trailer_t trailer;
9433 char padding[0]; /* Avoid generating empty UData structs */
9434 } RequestU __attribute__((unused));
9435#ifdef __MigPackStructs
9436#pragma pack(pop)
9437#endif
9438 typedef __RequestKData__io_connect_set_notification_port_64_t RequestK;
9439 typedef __RequestUData__io_connect_set_notification_port_64_t __RequestU;
9440 typedef __ReplyKData__io_connect_set_notification_port_64_t ReplyK __attribute__((unused));
9441 typedef __ReplyUData__io_connect_set_notification_port_64_t ReplyU __attribute__((unused));
9442 typedef __Reply__io_connect_set_notification_port_64_t Reply __attribute__((unused));
9443 typedef __Request__io_connect_set_notification_port_64_t __Request __attribute__((unused));
9444
9445 /*
9446 * typedef struct {
9447 * mach_msg_header_t Head;
9448 * NDR_record_t NDR;
9449 * kern_return_t RetCode;
9450 * } mig_reply_error_t;
9451 */
9452
9453 RequestK *InKP = (RequestK *) InHeadP;
9454 RequestU *In0UP = (RequestU *) InDataP;
9455 ReplyK *OutKP = (ReplyK *) OutHeadP;
9456 ReplyU *OutUP = (ReplyU *) OutDataP;
9457 (void)OutUP;
9458#ifdef __MIG_check__Request__io_connect_set_notification_port_64_t__defined
9459 kern_return_t check_result;
9460#endif /* __MIG_check__Request__io_connect_set_notification_port_64_t__defined */
9461
9462#if __MigKernelSpecificCode
9463#else
9464#endif /* __MigKernelSpecificCode */
9465 io_connect_t connection;
9466
9467 __DeclareRcvRpc(2867, "io_connect_set_notification_port_64")
9468 __BeforeRcvRpc(2867, "io_connect_set_notification_port_64")
9469
9470#if defined(__MIG_check__Request__io_connect_set_notification_port_64_t__defined)
9471 check_result = __MIG_check__Request__io_connect_set_notification_port_64_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
9472 if (check_result != MACH_MSG_SUCCESS)
9473 { MIG_RETURN_ERROR(OutKP, check_result); }
9474#endif /* defined(__MIG_check__Request__io_connect_set_notification_port_64_t__defined) */
9475
9476 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
9477
9478 OutUP->RetCode = is_io_connect_set_notification_port_64(connection, notification_type: In0UP->notification_type, port: InKP->port.name, reference: In0UP->reference);
9479 iokit_remove_connect_reference(obj: connection);
9480#if __MigKernelSpecificCode
9481#endif /* __MigKernelSpecificCode */
9482
9483 OutUP->NDR = NDR_record;
9484
9485
9486 __AfterRcvRpc(2867, "io_connect_set_notification_port_64")
9487}
9488
9489#if ( __MigTypeCheck )
9490#if __MIG_check__Request__iokit_subsystem__
9491#if !defined(__MIG_check__Request__io_service_add_notification_64_t__defined)
9492#define __MIG_check__Request__io_service_add_notification_64_t__defined
9493
9494mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_64_t(
9495 __attribute__((__unused__)) __RequestKData__io_service_add_notification_64_t *InKP,
9496 __attribute__((__unused__)) __RequestUData__io_service_add_notification_64_t *In0UP,
9497 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9498 __attribute__((__unused__)) __RequestUData__io_service_add_notification_64_t **In1UPP,
9499 __attribute__((__unused__)) __RequestUData__io_service_add_notification_64_t **In2UPP)
9500{
9501
9502 typedef __Request__io_service_add_notification_64_t __Request;
9503 typedef __RequestUData__io_service_add_notification_64_t __RequestU __attribute__((unused));
9504 __RequestU *In1UP;
9505 __RequestU *In2UP;
9506#if __MigTypeCheck
9507 unsigned int msgh_size;
9508#endif /* __MigTypeCheck */
9509 unsigned int msgh_size_delta;
9510
9511#if __MigTypeCheck
9512 msgh_size = InKP->Head.msgh_size;
9513 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
9514 (InKP->msgh_body.msgh_descriptor_count != 1) ||
9515 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 704)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
9516 return MIG_BAD_ARGUMENTS;
9517#endif /* __MigTypeCheck */
9518
9519#if __MigTypeCheck
9520 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
9521 InKP->wake_port.disposition != 17)
9522 return MIG_TYPE_ERROR;
9523#endif /* __MigTypeCheck */
9524
9525#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_64_t__notification_typeCnt__defined)
9526 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9527 __NDR_convert__int_rep__Request__io_service_add_notification_64_t__notification_typeCnt(&In0UP->notification_typeCnt, In0UP->NDR.int_rep);
9528#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_64_t__notification_typeCnt__defined */
9529 msgh_size_delta = _WALIGN_(In0UP->notification_typeCnt);
9530#if __MigTypeCheck
9531 if (In0UP->notification_typeCnt > 128)
9532 return MIG_BAD_ARGUMENTS;
9533 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 704)) < In0UP->notification_typeCnt) ||
9534 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 704) + _WALIGN_(In0UP->notification_typeCnt)))
9535 return MIG_BAD_ARGUMENTS;
9536 msgh_size -= msgh_size_delta;
9537#endif /* __MigTypeCheck */
9538
9539 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
9540
9541#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_64_t__matchingCnt__defined)
9542 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9543 __NDR_convert__int_rep__Request__io_service_add_notification_64_t__matchingCnt(&In1UP->matchingCnt, In1UP->NDR.int_rep);
9544#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_64_t__matchingCnt__defined */
9545 msgh_size_delta = _WALIGN_(In1UP->matchingCnt);
9546#if __MigTypeCheck
9547 if (In1UP->matchingCnt > 512)
9548 return MIG_BAD_ARGUMENTS;
9549 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 704)) < In1UP->matchingCnt) ||
9550 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 704) + _WALIGN_(In1UP->matchingCnt)))
9551 return MIG_BAD_ARGUMENTS;
9552 msgh_size -= msgh_size_delta;
9553#endif /* __MigTypeCheck */
9554
9555 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 512);
9556
9557#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_64_t__referenceCnt__defined)
9558 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9559 __NDR_convert__int_rep__Request__io_service_add_notification_64_t__referenceCnt(&In2UP->referenceCnt, In2UP->NDR.int_rep);
9560#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_64_t__referenceCnt__defined */
9561#if __MigTypeCheck
9562 if (In2UP->referenceCnt > 8)
9563 return MIG_BAD_ARGUMENTS;
9564 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 704)) / 8 < In2UP->referenceCnt) ||
9565 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 704) + (8 * In2UP->referenceCnt)))
9566 return MIG_BAD_ARGUMENTS;
9567#endif /* __MigTypeCheck */
9568
9569#if __MigTypeCheck
9570 {
9571 char * msg_limit = (char *) InTrailerP;
9572#if __MigKernelSpecificCode
9573 size_t strnlen_limit;
9574#else
9575 size_t memchr_limit;
9576#endif /* __MigKernelSpecificCode */
9577
9578#if __MigKernelSpecificCode
9579 strnlen_limit = min((msg_limit - In0UP->notification_type), 128);
9580 if (( strnlen(s: In0UP->notification_type, n: strnlen_limit) >= 128 + 1 ))
9581 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
9582#else
9583 memchr_limit = min((msg_limit - In0UP->notification_type), 128);
9584 if (( memchr(In0UP->notification_type, '\0', memchr_limit) == NULL ))
9585 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
9586#endif /* __MigKernelSpecificCode */
9587#if __MigKernelSpecificCode
9588 strnlen_limit = min((msg_limit - In1UP->matching), 512);
9589 if (( strnlen(s: In1UP->matching, n: strnlen_limit) >= 512 + 1 ))
9590 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
9591#else
9592 memchr_limit = min((msg_limit - In1UP->matching), 512);
9593 if (( memchr(In1UP->matching, '\0', memchr_limit) == NULL ))
9594 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
9595#endif /* __MigKernelSpecificCode */
9596 }
9597#endif /* __MigTypeCheck */
9598
9599 return MACH_MSG_SUCCESS;
9600}
9601#endif /* !defined(__MIG_check__Request__io_service_add_notification_64_t__defined) */
9602#endif /* __MIG_check__Request__iokit_subsystem__ */
9603#endif /* ( __MigTypeCheck ) */
9604
9605
9606/* Routine io_service_add_notification_64 */
9607mig_internal novalue _Xio_service_add_notification_64
9608 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
9609 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9610 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
9611{
9612
9613#ifdef __MigPackStructs
9614#pragma pack(push, 4)
9615#endif
9616 typedef struct {
9617 NDR_record_t NDR;
9618 mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
9619 mach_msg_type_number_t notification_typeCnt;
9620 char notification_type[128];
9621 mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
9622 mach_msg_type_number_t matchingCnt;
9623 char matching[512];
9624 mach_msg_type_number_t referenceCnt;
9625 io_user_reference_t reference[8];
9626 mach_msg_trailer_t trailer;
9627 char padding[0]; /* Avoid generating empty UData structs */
9628 } RequestU __attribute__((unused));
9629#ifdef __MigPackStructs
9630#pragma pack(pop)
9631#endif
9632 typedef __RequestKData__io_service_add_notification_64_t RequestK;
9633 typedef __RequestUData__io_service_add_notification_64_t __RequestU;
9634 typedef __ReplyKData__io_service_add_notification_64_t ReplyK __attribute__((unused));
9635 typedef __ReplyUData__io_service_add_notification_64_t ReplyU __attribute__((unused));
9636 typedef __Reply__io_service_add_notification_64_t Reply __attribute__((unused));
9637 typedef __Request__io_service_add_notification_64_t __Request __attribute__((unused));
9638
9639 /*
9640 * typedef struct {
9641 * mach_msg_header_t Head;
9642 * NDR_record_t NDR;
9643 * kern_return_t RetCode;
9644 * } mig_reply_error_t;
9645 */
9646
9647 RequestK *InKP = (RequestK *) InHeadP;
9648 RequestU *In0UP = (RequestU *) InDataP;
9649 RequestU *In1UP;
9650 RequestU *In2UP;
9651 ReplyK *OutKP = (ReplyK *) OutHeadP;
9652 ReplyU *OutUP = (ReplyU *) OutDataP;
9653 (void)OutUP;
9654#ifdef __MIG_check__Request__io_service_add_notification_64_t__defined
9655 kern_return_t check_result;
9656#endif /* __MIG_check__Request__io_service_add_notification_64_t__defined */
9657
9658#if __MigKernelSpecificCode
9659#if UseStaticTemplates
9660 const static mach_msg_port_descriptor_t notificationTemplate = {
9661 /* name = */ MACH_PORT_NULL,
9662 /* pad1 = */ 0,
9663 /* pad2 = */ 0,
9664 /* disp = */ 17,
9665 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
9666 };
9667#endif /* UseStaticTemplates */
9668
9669#else
9670#if UseStaticTemplates
9671 const static mach_msg_port_descriptor_t notificationTemplate = {
9672 /* name = */ MACH_PORT_NULL,
9673 /* pad1 = */ 0,
9674 /* pad2 = */ 0,
9675 /* disp = */ 19,
9676 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
9677 };
9678#endif /* UseStaticTemplates */
9679
9680#endif /* __MigKernelSpecificCode */
9681 kern_return_t RetCode;
9682 io_object_t notification;
9683
9684 __DeclareRcvRpc(2868, "io_service_add_notification_64")
9685 __BeforeRcvRpc(2868, "io_service_add_notification_64")
9686
9687#if defined(__MIG_check__Request__io_service_add_notification_64_t__defined)
9688 check_result = __MIG_check__Request__io_service_add_notification_64_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
9689 if (check_result != MACH_MSG_SUCCESS)
9690 { MIG_RETURN_ERROR(OutKP, check_result); }
9691#endif /* defined(__MIG_check__Request__io_service_add_notification_64_t__defined) */
9692
9693#if UseStaticTemplates
9694 OutKP->notification = notificationTemplate;
9695#else /* UseStaticTemplates */
9696#if __MigKernelSpecificCode
9697 OutKP->notification.disposition = 17;
9698#else
9699 OutKP->notification.disposition = 19;
9700#endif /* __MigKernelSpecificCode */
9701#if !(defined(KERNEL) && defined(__LP64__))
9702 OutKP->notification.pad1 = 0;
9703#endif
9704 OutKP->notification.pad2 = 0;
9705 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
9706#if defined(KERNEL)
9707 OutKP->notification.pad_end = 0;
9708#endif
9709#endif /* UseStaticTemplates */
9710
9711
9712 RetCode = is_io_service_add_notification_64(main_port: InKP->Head.msgh_request_port, notification_type: In0UP->notification_type, matching: In1UP->matching, wake_port: InKP->wake_port.name, reference: In2UP->reference, referenceCnt: In2UP->referenceCnt, notification: &notification);
9713 if (RetCode != KERN_SUCCESS) {
9714 MIG_RETURN_ERROR(OutKP, RetCode);
9715 }
9716#if __MigKernelSpecificCode
9717#endif /* __MigKernelSpecificCode */
9718 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
9719
9720
9721 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
9722 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
9723 OutKP->msgh_body.msgh_descriptor_count = 1;
9724 __AfterRcvRpc(2868, "io_service_add_notification_64")
9725}
9726
9727#if ( __MigTypeCheck )
9728#if __MIG_check__Request__iokit_subsystem__
9729#if !defined(__MIG_check__Request__io_service_add_interest_notification_64_t__defined)
9730#define __MIG_check__Request__io_service_add_interest_notification_64_t__defined
9731
9732mig_internal kern_return_t __MIG_check__Request__io_service_add_interest_notification_64_t(
9733 __attribute__((__unused__)) __RequestKData__io_service_add_interest_notification_64_t *InKP,
9734 __attribute__((__unused__)) __RequestUData__io_service_add_interest_notification_64_t *In0UP,
9735 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9736 __attribute__((__unused__)) __RequestUData__io_service_add_interest_notification_64_t **In1UPP)
9737{
9738
9739 typedef __Request__io_service_add_interest_notification_64_t __Request;
9740 typedef __RequestUData__io_service_add_interest_notification_64_t __RequestU __attribute__((unused));
9741 __RequestU *In1UP;
9742#if __MigTypeCheck
9743 unsigned int msgh_size;
9744#endif /* __MigTypeCheck */
9745 unsigned int msgh_size_delta;
9746
9747#if __MigTypeCheck
9748 msgh_size = InKP->Head.msgh_size;
9749 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
9750 (InKP->msgh_body.msgh_descriptor_count != 1) ||
9751 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
9752 return MIG_BAD_ARGUMENTS;
9753#endif /* __MigTypeCheck */
9754
9755#if __MigTypeCheck
9756 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
9757 InKP->wake_port.disposition != 17)
9758 return MIG_TYPE_ERROR;
9759#endif /* __MigTypeCheck */
9760
9761#if defined(__NDR_convert__int_rep__Request__io_service_add_interest_notification_64_t__type_of_interestCnt__defined)
9762 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9763 __NDR_convert__int_rep__Request__io_service_add_interest_notification_64_t__type_of_interestCnt(&In0UP->type_of_interestCnt, In0UP->NDR.int_rep);
9764#endif /* __NDR_convert__int_rep__Request__io_service_add_interest_notification_64_t__type_of_interestCnt__defined */
9765 msgh_size_delta = _WALIGN_(In0UP->type_of_interestCnt);
9766#if __MigTypeCheck
9767 if (In0UP->type_of_interestCnt > 128)
9768 return MIG_BAD_ARGUMENTS;
9769 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) < In0UP->type_of_interestCnt) ||
9770 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192) + _WALIGN_(In0UP->type_of_interestCnt)))
9771 return MIG_BAD_ARGUMENTS;
9772 msgh_size -= msgh_size_delta;
9773#endif /* __MigTypeCheck */
9774
9775 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
9776
9777#if defined(__NDR_convert__int_rep__Request__io_service_add_interest_notification_64_t__referenceCnt__defined)
9778 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9779 __NDR_convert__int_rep__Request__io_service_add_interest_notification_64_t__referenceCnt(&In1UP->referenceCnt, In1UP->NDR.int_rep);
9780#endif /* __NDR_convert__int_rep__Request__io_service_add_interest_notification_64_t__referenceCnt__defined */
9781#if __MigTypeCheck
9782 if (In1UP->referenceCnt > 8)
9783 return MIG_BAD_ARGUMENTS;
9784 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) / 8 < In1UP->referenceCnt) ||
9785 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 192) + (8 * In1UP->referenceCnt)))
9786 return MIG_BAD_ARGUMENTS;
9787#endif /* __MigTypeCheck */
9788
9789#if __MigTypeCheck
9790 {
9791 char * msg_limit = (char *) InTrailerP;
9792#if __MigKernelSpecificCode
9793 size_t strnlen_limit;
9794#else
9795 size_t memchr_limit;
9796#endif /* __MigKernelSpecificCode */
9797
9798#if __MigKernelSpecificCode
9799 strnlen_limit = min((msg_limit - In0UP->type_of_interest), 128);
9800 if (( strnlen(s: In0UP->type_of_interest, n: strnlen_limit) >= 128 + 1 ))
9801 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
9802#else
9803 memchr_limit = min((msg_limit - In0UP->type_of_interest), 128);
9804 if (( memchr(In0UP->type_of_interest, '\0', memchr_limit) == NULL ))
9805 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
9806#endif /* __MigKernelSpecificCode */
9807 }
9808#endif /* __MigTypeCheck */
9809
9810 return MACH_MSG_SUCCESS;
9811}
9812#endif /* !defined(__MIG_check__Request__io_service_add_interest_notification_64_t__defined) */
9813#endif /* __MIG_check__Request__iokit_subsystem__ */
9814#endif /* ( __MigTypeCheck ) */
9815
9816
9817/* Routine io_service_add_interest_notification_64 */
9818mig_internal novalue _Xio_service_add_interest_notification_64
9819 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
9820 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9821 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
9822{
9823
9824#ifdef __MigPackStructs
9825#pragma pack(push, 4)
9826#endif
9827 typedef struct {
9828 NDR_record_t NDR;
9829 mach_msg_type_number_t type_of_interestOffset; /* MiG doesn't use it */
9830 mach_msg_type_number_t type_of_interestCnt;
9831 char type_of_interest[128];
9832 mach_msg_type_number_t referenceCnt;
9833 io_user_reference_t reference[8];
9834 mach_msg_trailer_t trailer;
9835 char padding[0]; /* Avoid generating empty UData structs */
9836 } RequestU __attribute__((unused));
9837#ifdef __MigPackStructs
9838#pragma pack(pop)
9839#endif
9840 typedef __RequestKData__io_service_add_interest_notification_64_t RequestK;
9841 typedef __RequestUData__io_service_add_interest_notification_64_t __RequestU;
9842 typedef __ReplyKData__io_service_add_interest_notification_64_t ReplyK __attribute__((unused));
9843 typedef __ReplyUData__io_service_add_interest_notification_64_t ReplyU __attribute__((unused));
9844 typedef __Reply__io_service_add_interest_notification_64_t Reply __attribute__((unused));
9845 typedef __Request__io_service_add_interest_notification_64_t __Request __attribute__((unused));
9846
9847 /*
9848 * typedef struct {
9849 * mach_msg_header_t Head;
9850 * NDR_record_t NDR;
9851 * kern_return_t RetCode;
9852 * } mig_reply_error_t;
9853 */
9854
9855 RequestK *InKP = (RequestK *) InHeadP;
9856 RequestU *In0UP = (RequestU *) InDataP;
9857 RequestU *In1UP;
9858 ReplyK *OutKP = (ReplyK *) OutHeadP;
9859 ReplyU *OutUP = (ReplyU *) OutDataP;
9860 (void)OutUP;
9861#ifdef __MIG_check__Request__io_service_add_interest_notification_64_t__defined
9862 kern_return_t check_result;
9863#endif /* __MIG_check__Request__io_service_add_interest_notification_64_t__defined */
9864
9865#if __MigKernelSpecificCode
9866#if UseStaticTemplates
9867 const static mach_msg_port_descriptor_t notificationTemplate = {
9868 /* name = */ MACH_PORT_NULL,
9869 /* pad1 = */ 0,
9870 /* pad2 = */ 0,
9871 /* disp = */ 17,
9872 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
9873 };
9874#endif /* UseStaticTemplates */
9875
9876#else
9877#if UseStaticTemplates
9878 const static mach_msg_port_descriptor_t notificationTemplate = {
9879 /* name = */ MACH_PORT_NULL,
9880 /* pad1 = */ 0,
9881 /* pad2 = */ 0,
9882 /* disp = */ 19,
9883 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
9884 };
9885#endif /* UseStaticTemplates */
9886
9887#endif /* __MigKernelSpecificCode */
9888 kern_return_t RetCode;
9889 io_object_t service;
9890 io_object_t notification;
9891
9892 __DeclareRcvRpc(2869, "io_service_add_interest_notification_64")
9893 __BeforeRcvRpc(2869, "io_service_add_interest_notification_64")
9894
9895#if defined(__MIG_check__Request__io_service_add_interest_notification_64_t__defined)
9896 check_result = __MIG_check__Request__io_service_add_interest_notification_64_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
9897 if (check_result != MACH_MSG_SUCCESS)
9898 { MIG_RETURN_ERROR(OutKP, check_result); }
9899#endif /* defined(__MIG_check__Request__io_service_add_interest_notification_64_t__defined) */
9900
9901#if UseStaticTemplates
9902 OutKP->notification = notificationTemplate;
9903#else /* UseStaticTemplates */
9904#if __MigKernelSpecificCode
9905 OutKP->notification.disposition = 17;
9906#else
9907 OutKP->notification.disposition = 19;
9908#endif /* __MigKernelSpecificCode */
9909#if !(defined(KERNEL) && defined(__LP64__))
9910 OutKP->notification.pad1 = 0;
9911#endif
9912 OutKP->notification.pad2 = 0;
9913 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
9914#if defined(KERNEL)
9915 OutKP->notification.pad_end = 0;
9916#endif
9917#endif /* UseStaticTemplates */
9918
9919
9920 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
9921
9922 RetCode = is_io_service_add_interest_notification_64(service, type_of_interest: In0UP->type_of_interest, wake_port: InKP->wake_port.name, reference: In1UP->reference, referenceCnt: In1UP->referenceCnt, notification: &notification);
9923 iokit_remove_reference(obj: service);
9924 if (RetCode != KERN_SUCCESS) {
9925 MIG_RETURN_ERROR(OutKP, RetCode);
9926 }
9927#if __MigKernelSpecificCode
9928#endif /* __MigKernelSpecificCode */
9929 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
9930
9931
9932 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
9933 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
9934 OutKP->msgh_body.msgh_descriptor_count = 1;
9935 __AfterRcvRpc(2869, "io_service_add_interest_notification_64")
9936}
9937
9938#if ( __MigTypeCheck )
9939#if __MIG_check__Request__iokit_subsystem__
9940#if !defined(__MIG_check__Request__io_service_add_notification_ool_64_t__defined)
9941#define __MIG_check__Request__io_service_add_notification_ool_64_t__defined
9942
9943mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_ool_64_t(
9944 __attribute__((__unused__)) __RequestKData__io_service_add_notification_ool_64_t *InKP,
9945 __attribute__((__unused__)) __RequestUData__io_service_add_notification_ool_64_t *In0UP,
9946 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
9947 __attribute__((__unused__)) __RequestUData__io_service_add_notification_ool_64_t **In1UPP)
9948{
9949
9950 typedef __Request__io_service_add_notification_ool_64_t __Request;
9951 typedef __RequestUData__io_service_add_notification_ool_64_t __RequestU __attribute__((unused));
9952 __RequestU *In1UP;
9953#if __MigTypeCheck
9954 unsigned int msgh_size;
9955#endif /* __MigTypeCheck */
9956 unsigned int msgh_size_delta;
9957
9958#if __MigTypeCheck
9959 msgh_size = InKP->Head.msgh_size;
9960 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
9961 (InKP->msgh_body.msgh_descriptor_count != 2) ||
9962 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
9963 return MIG_BAD_ARGUMENTS;
9964#endif /* __MigTypeCheck */
9965
9966#if __MigTypeCheck
9967 if (InKP->matching.type != MACH_MSG_OOL_DESCRIPTOR)
9968 return MIG_TYPE_ERROR;
9969#endif /* __MigTypeCheck */
9970
9971#if __MigTypeCheck
9972 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
9973 InKP->wake_port.disposition != 17)
9974 return MIG_TYPE_ERROR;
9975#endif /* __MigTypeCheck */
9976
9977#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_ool_64_t__notification_typeCnt__defined)
9978 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9979 __NDR_convert__int_rep__Request__io_service_add_notification_ool_64_t__notification_typeCnt(&In0UP->notification_typeCnt, In0UP->NDR.int_rep);
9980#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_ool_64_t__notification_typeCnt__defined */
9981 msgh_size_delta = _WALIGN_(In0UP->notification_typeCnt);
9982#if __MigTypeCheck
9983 if (In0UP->notification_typeCnt > 128)
9984 return MIG_BAD_ARGUMENTS;
9985 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) < In0UP->notification_typeCnt) ||
9986 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192) + _WALIGN_(In0UP->notification_typeCnt)))
9987 return MIG_BAD_ARGUMENTS;
9988 msgh_size -= msgh_size_delta;
9989#endif /* __MigTypeCheck */
9990
9991 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
9992
9993#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_ool_64_t__referenceCnt__defined)
9994 if (In0UP->NDR.int_rep != NDR_record.int_rep)
9995 __NDR_convert__int_rep__Request__io_service_add_notification_ool_64_t__referenceCnt(&In1UP->referenceCnt, In1UP->NDR.int_rep);
9996#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_ool_64_t__referenceCnt__defined */
9997#if __MigTypeCheck
9998 if (In1UP->referenceCnt > 8)
9999 return MIG_BAD_ARGUMENTS;
10000 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) / 8 < In1UP->referenceCnt) ||
10001 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 192) + (8 * In1UP->referenceCnt)))
10002 return MIG_BAD_ARGUMENTS;
10003#endif /* __MigTypeCheck */
10004
10005#if __MigTypeCheck
10006 if (InKP->matching.size != In1UP->matchingCnt)
10007 return MIG_TYPE_ERROR;
10008#endif /* __MigTypeCheck */
10009
10010#if __MigTypeCheck
10011 {
10012 char * msg_limit = (char *) InTrailerP;
10013#if __MigKernelSpecificCode
10014 size_t strnlen_limit;
10015#else
10016 size_t memchr_limit;
10017#endif /* __MigKernelSpecificCode */
10018
10019#if __MigKernelSpecificCode
10020 strnlen_limit = min((msg_limit - In0UP->notification_type), 128);
10021 if (( strnlen(s: In0UP->notification_type, n: strnlen_limit) >= 128 + 1 ))
10022 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
10023#else
10024 memchr_limit = min((msg_limit - In0UP->notification_type), 128);
10025 if (( memchr(In0UP->notification_type, '\0', memchr_limit) == NULL ))
10026 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
10027#endif /* __MigKernelSpecificCode */
10028 }
10029#endif /* __MigTypeCheck */
10030
10031 return MACH_MSG_SUCCESS;
10032}
10033#endif /* !defined(__MIG_check__Request__io_service_add_notification_ool_64_t__defined) */
10034#endif /* __MIG_check__Request__iokit_subsystem__ */
10035#endif /* ( __MigTypeCheck ) */
10036
10037
10038/* Routine io_service_add_notification_ool_64 */
10039mig_internal novalue _Xio_service_add_notification_ool_64
10040 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
10041 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10042 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
10043{
10044
10045#ifdef __MigPackStructs
10046#pragma pack(push, 4)
10047#endif
10048 typedef struct {
10049 NDR_record_t NDR;
10050 mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
10051 mach_msg_type_number_t notification_typeCnt;
10052 char notification_type[128];
10053 mach_msg_type_number_t matchingCnt;
10054 mach_msg_type_number_t referenceCnt;
10055 io_user_reference_t reference[8];
10056 mach_msg_trailer_t trailer;
10057 char padding[0]; /* Avoid generating empty UData structs */
10058 } RequestU __attribute__((unused));
10059#ifdef __MigPackStructs
10060#pragma pack(pop)
10061#endif
10062 typedef __RequestKData__io_service_add_notification_ool_64_t RequestK;
10063 typedef __RequestUData__io_service_add_notification_ool_64_t __RequestU;
10064 typedef __ReplyKData__io_service_add_notification_ool_64_t ReplyK __attribute__((unused));
10065 typedef __ReplyUData__io_service_add_notification_ool_64_t ReplyU __attribute__((unused));
10066 typedef __Reply__io_service_add_notification_ool_64_t Reply __attribute__((unused));
10067 typedef __Request__io_service_add_notification_ool_64_t __Request __attribute__((unused));
10068
10069 /*
10070 * typedef struct {
10071 * mach_msg_header_t Head;
10072 * NDR_record_t NDR;
10073 * kern_return_t RetCode;
10074 * } mig_reply_error_t;
10075 */
10076
10077 RequestK *InKP = (RequestK *) InHeadP;
10078 RequestU *In0UP = (RequestU *) InDataP;
10079 RequestU *In1UP;
10080 ReplyK *OutKP = (ReplyK *) OutHeadP;
10081 ReplyU *OutUP = (ReplyU *) OutDataP;
10082 (void)OutUP;
10083#ifdef __MIG_check__Request__io_service_add_notification_ool_64_t__defined
10084 kern_return_t check_result;
10085#endif /* __MIG_check__Request__io_service_add_notification_ool_64_t__defined */
10086
10087#if __MigKernelSpecificCode
10088#if UseStaticTemplates
10089 const static mach_msg_port_descriptor_t notificationTemplate = {
10090 /* name = */ MACH_PORT_NULL,
10091 /* pad1 = */ 0,
10092 /* pad2 = */ 0,
10093 /* disp = */ 17,
10094 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
10095 };
10096#endif /* UseStaticTemplates */
10097
10098#else
10099#if UseStaticTemplates
10100 const static mach_msg_port_descriptor_t notificationTemplate = {
10101 /* name = */ MACH_PORT_NULL,
10102 /* pad1 = */ 0,
10103 /* pad2 = */ 0,
10104 /* disp = */ 19,
10105 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
10106 };
10107#endif /* UseStaticTemplates */
10108
10109#endif /* __MigKernelSpecificCode */
10110 kern_return_t RetCode;
10111 io_object_t notification;
10112
10113 __DeclareRcvRpc(2870, "io_service_add_notification_ool_64")
10114 __BeforeRcvRpc(2870, "io_service_add_notification_ool_64")
10115
10116#if defined(__MIG_check__Request__io_service_add_notification_ool_64_t__defined)
10117 check_result = __MIG_check__Request__io_service_add_notification_ool_64_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
10118 if (check_result != MACH_MSG_SUCCESS)
10119 { MIG_RETURN_ERROR(OutKP, check_result); }
10120#endif /* defined(__MIG_check__Request__io_service_add_notification_ool_64_t__defined) */
10121
10122#if UseStaticTemplates
10123 OutKP->notification = notificationTemplate;
10124#else /* UseStaticTemplates */
10125#if __MigKernelSpecificCode
10126 OutKP->notification.disposition = 17;
10127#else
10128 OutKP->notification.disposition = 19;
10129#endif /* __MigKernelSpecificCode */
10130#if !(defined(KERNEL) && defined(__LP64__))
10131 OutKP->notification.pad1 = 0;
10132#endif
10133 OutKP->notification.pad2 = 0;
10134 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
10135#if defined(KERNEL)
10136 OutKP->notification.pad_end = 0;
10137#endif
10138#endif /* UseStaticTemplates */
10139
10140
10141 RetCode = is_io_service_add_notification_ool_64(main_port: InKP->Head.msgh_request_port, notification_type: In0UP->notification_type, matching: (io_buf_ptr_t)(InKP->matching.address), matchingCnt: InKP->matching.size, wake_port: InKP->wake_port.name, reference: In1UP->reference, referenceCnt: In1UP->referenceCnt, result: &OutUP->result, notification: &notification);
10142 if (RetCode != KERN_SUCCESS) {
10143 MIG_RETURN_ERROR(OutKP, RetCode);
10144 }
10145#if __MigKernelSpecificCode
10146#endif /* __MigKernelSpecificCode */
10147 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
10148
10149
10150 OutUP->NDR = NDR_record;
10151
10152
10153 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
10154 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
10155 OutKP->msgh_body.msgh_descriptor_count = 1;
10156 __AfterRcvRpc(2870, "io_service_add_notification_ool_64")
10157}
10158
10159#if ( __MigTypeCheck )
10160#if __MIG_check__Request__iokit_subsystem__
10161#if !defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined)
10162#define __MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined
10163
10164mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_registry_entry_id_t(
10165 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_registry_entry_id_t *InKP,
10166 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_registry_entry_id_t *In0UP,
10167 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
10168{
10169
10170 typedef __Request__io_registry_entry_get_registry_entry_id_t __Request;
10171 typedef __RequestUData__io_registry_entry_get_registry_entry_id_t __RequestU __attribute__((unused));
10172#if __MigTypeCheck
10173 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
10174 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
10175 return MIG_BAD_ARGUMENTS;
10176#endif /* __MigTypeCheck */
10177
10178 return MACH_MSG_SUCCESS;
10179}
10180#endif /* !defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined) */
10181#endif /* __MIG_check__Request__iokit_subsystem__ */
10182#endif /* ( __MigTypeCheck ) */
10183
10184
10185/* Routine io_registry_entry_get_registry_entry_id */
10186mig_internal novalue _Xio_registry_entry_get_registry_entry_id
10187 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
10188 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10189 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
10190{
10191
10192#ifdef __MigPackStructs
10193#pragma pack(push, 4)
10194#endif
10195 typedef struct {
10196 mach_msg_trailer_t trailer;
10197 char padding[0]; /* Avoid generating empty UData structs */
10198 } RequestU __attribute__((unused));
10199#ifdef __MigPackStructs
10200#pragma pack(pop)
10201#endif
10202 typedef __RequestKData__io_registry_entry_get_registry_entry_id_t RequestK;
10203 typedef __RequestUData__io_registry_entry_get_registry_entry_id_t __RequestU;
10204 typedef __ReplyKData__io_registry_entry_get_registry_entry_id_t ReplyK __attribute__((unused));
10205 typedef __ReplyUData__io_registry_entry_get_registry_entry_id_t ReplyU __attribute__((unused));
10206 typedef __Reply__io_registry_entry_get_registry_entry_id_t Reply __attribute__((unused));
10207 typedef __Request__io_registry_entry_get_registry_entry_id_t __Request __attribute__((unused));
10208
10209 /*
10210 * typedef struct {
10211 * mach_msg_header_t Head;
10212 * NDR_record_t NDR;
10213 * kern_return_t RetCode;
10214 * } mig_reply_error_t;
10215 */
10216
10217 RequestK *InKP = (RequestK *) InHeadP;
10218 RequestU *In0UP = (RequestU *) InDataP;
10219 ReplyK *OutKP = (ReplyK *) OutHeadP;
10220 ReplyU *OutUP = (ReplyU *) OutDataP;
10221 (void)OutUP;
10222#ifdef __MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined
10223 kern_return_t check_result;
10224#endif /* __MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined */
10225
10226#if __MigKernelSpecificCode
10227#else
10228#endif /* __MigKernelSpecificCode */
10229 io_object_t registry_entry;
10230
10231 __DeclareRcvRpc(2871, "io_registry_entry_get_registry_entry_id")
10232 __BeforeRcvRpc(2871, "io_registry_entry_get_registry_entry_id")
10233
10234#if defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined)
10235 check_result = __MIG_check__Request__io_registry_entry_get_registry_entry_id_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
10236 if (check_result != MACH_MSG_SUCCESS)
10237 { MIG_RETURN_ERROR(OutKP, check_result); }
10238#endif /* defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined) */
10239
10240 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
10241
10242 OutUP->RetCode = is_io_registry_entry_get_registry_entry_id(registry_entry, entry_id: &OutUP->entry_id);
10243 iokit_remove_reference(obj: registry_entry);
10244 if (OutUP->RetCode != KERN_SUCCESS) {
10245 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
10246 }
10247#if __MigKernelSpecificCode
10248#endif /* __MigKernelSpecificCode */
10249
10250 OutUP->NDR = NDR_record;
10251
10252
10253 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
10254 __AfterRcvRpc(2871, "io_registry_entry_get_registry_entry_id")
10255}
10256
10257#if ( __MigTypeCheck )
10258#if __MIG_check__Request__iokit_subsystem__
10259#if !defined(__MIG_check__Request__io_connect_method_var_output_t__defined)
10260#define __MIG_check__Request__io_connect_method_var_output_t__defined
10261
10262mig_internal kern_return_t __MIG_check__Request__io_connect_method_var_output_t(
10263 __attribute__((__unused__)) __RequestKData__io_connect_method_var_output_t *InKP,
10264 __attribute__((__unused__)) __RequestUData__io_connect_method_var_output_t *In0UP,
10265 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10266 __attribute__((__unused__)) __RequestUData__io_connect_method_var_output_t **In1UPP,
10267 __attribute__((__unused__)) __RequestUData__io_connect_method_var_output_t **In2UPP)
10268{
10269
10270 typedef __Request__io_connect_method_var_output_t __Request;
10271 typedef __RequestUData__io_connect_method_var_output_t __RequestU __attribute__((unused));
10272 __RequestU *In1UP;
10273 __RequestU *In2UP;
10274#if __MigTypeCheck
10275 unsigned int msgh_size;
10276#endif /* __MigTypeCheck */
10277 unsigned int msgh_size_delta;
10278
10279#if __MigTypeCheck
10280 msgh_size = InKP->Head.msgh_size;
10281 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
10282 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
10283 return MIG_BAD_ARGUMENTS;
10284#endif /* __MigTypeCheck */
10285
10286#if defined(__NDR_convert__int_rep__Request__io_connect_method_var_output_t__scalar_inputCnt__defined)
10287 if (In0UP->NDR.int_rep != NDR_record.int_rep)
10288 __NDR_convert__int_rep__Request__io_connect_method_var_output_t__scalar_inputCnt(&In0UP->scalar_inputCnt, In0UP->NDR.int_rep);
10289#endif /* __NDR_convert__int_rep__Request__io_connect_method_var_output_t__scalar_inputCnt__defined */
10290 msgh_size_delta = (8 * In0UP->scalar_inputCnt);
10291#if __MigTypeCheck
10292 if (In0UP->scalar_inputCnt > 16)
10293 return MIG_BAD_ARGUMENTS;
10294 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) / 8 < In0UP->scalar_inputCnt) ||
10295 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224) + (8 * In0UP->scalar_inputCnt)))
10296 return MIG_BAD_ARGUMENTS;
10297 msgh_size -= msgh_size_delta;
10298#endif /* __MigTypeCheck */
10299
10300 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
10301
10302#if defined(__NDR_convert__int_rep__Request__io_connect_method_var_output_t__inband_inputCnt__defined)
10303 if (In0UP->NDR.int_rep != NDR_record.int_rep)
10304 __NDR_convert__int_rep__Request__io_connect_method_var_output_t__inband_inputCnt(&In1UP->inband_inputCnt, In1UP->NDR.int_rep);
10305#endif /* __NDR_convert__int_rep__Request__io_connect_method_var_output_t__inband_inputCnt__defined */
10306 msgh_size_delta = _WALIGN_(In1UP->inband_inputCnt);
10307#if __MigTypeCheck
10308 if (In1UP->inband_inputCnt > 4096)
10309 return MIG_BAD_ARGUMENTS;
10310 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) < In1UP->inband_inputCnt) ||
10311 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4224) + _WALIGN_(In1UP->inband_inputCnt)))
10312 return MIG_BAD_ARGUMENTS;
10313#endif /* __MigTypeCheck */
10314
10315 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 4096);
10316
10317 return MACH_MSG_SUCCESS;
10318}
10319#endif /* !defined(__MIG_check__Request__io_connect_method_var_output_t__defined) */
10320#endif /* __MIG_check__Request__iokit_subsystem__ */
10321#endif /* ( __MigTypeCheck ) */
10322
10323
10324/* Routine io_connect_method_var_output */
10325mig_internal novalue _Xio_connect_method_var_output
10326 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
10327 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10328 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
10329{
10330
10331#ifdef __MigPackStructs
10332#pragma pack(push, 4)
10333#endif
10334 typedef struct {
10335 NDR_record_t NDR;
10336 uint32_t selector;
10337 mach_msg_type_number_t scalar_inputCnt;
10338 io_user_scalar_t scalar_input[16];
10339 mach_msg_type_number_t inband_inputCnt;
10340 char inband_input[4096];
10341 mach_vm_address_t ool_input;
10342 mach_vm_size_t ool_input_size;
10343 mach_msg_type_number_t inband_outputCnt;
10344 mach_msg_type_number_t scalar_outputCnt;
10345 mach_msg_trailer_t trailer;
10346 char padding[0]; /* Avoid generating empty UData structs */
10347 } RequestU __attribute__((unused));
10348#ifdef __MigPackStructs
10349#pragma pack(pop)
10350#endif
10351 typedef __RequestKData__io_connect_method_var_output_t RequestK;
10352 typedef __RequestUData__io_connect_method_var_output_t __RequestU;
10353 typedef __ReplyKData__io_connect_method_var_output_t ReplyK __attribute__((unused));
10354 typedef __ReplyUData__io_connect_method_var_output_t ReplyU __attribute__((unused));
10355 typedef __Reply__io_connect_method_var_output_t Reply __attribute__((unused));
10356 typedef __Request__io_connect_method_var_output_t __Request __attribute__((unused));
10357
10358 /*
10359 * typedef struct {
10360 * mach_msg_header_t Head;
10361 * NDR_record_t NDR;
10362 * kern_return_t RetCode;
10363 * } mig_reply_error_t;
10364 */
10365
10366 RequestK *InKP = (RequestK *) InHeadP;
10367 RequestU *In0UP = (RequestU *) InDataP;
10368 RequestU *In1UP;
10369 RequestU *In2UP;
10370 ReplyK *OutKP = (ReplyK *) OutHeadP;
10371 ReplyU *OutUP = (ReplyU *) OutDataP;
10372 (void)OutUP;
10373 unsigned int msgh_size;
10374 unsigned int msgh_size_delta;
10375
10376#ifdef __MIG_check__Request__io_connect_method_var_output_t__defined
10377 kern_return_t check_result;
10378#endif /* __MIG_check__Request__io_connect_method_var_output_t__defined */
10379
10380#if __MigKernelSpecificCode
10381#if UseStaticTemplates
10382 const static mach_msg_ool_descriptor_t var_outputTemplate = {
10383 /* addr = */ (void *)0,
10384 /* size = */ 0,
10385 /* deal = */ FALSE,
10386 /* copy = */ MACH_MSG_PHYSICAL_COPY,
10387 /* pad2 = */ 0,
10388 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
10389 };
10390#endif /* UseStaticTemplates */
10391
10392#else
10393#if UseStaticTemplates
10394 const static mach_msg_ool_descriptor_t var_outputTemplate = {
10395 /* addr = */ (void *)0,
10396 /* size = */ 0,
10397 /* deal = */ FALSE,
10398 /* copy = */ MACH_MSG_PHYSICAL_COPY,
10399 /* pad2 = */ 0,
10400 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
10401 };
10402#endif /* UseStaticTemplates */
10403
10404#endif /* __MigKernelSpecificCode */
10405 kern_return_t RetCode;
10406 io_connect_t connection;
10407 io_user_scalar_t scalar_output[16];
10408 mach_msg_type_number_t scalar_outputCnt;
10409 mach_msg_type_number_t var_outputCnt;
10410
10411 __DeclareRcvRpc(2872, "io_connect_method_var_output")
10412 __BeforeRcvRpc(2872, "io_connect_method_var_output")
10413
10414#if defined(__MIG_check__Request__io_connect_method_var_output_t__defined)
10415 check_result = __MIG_check__Request__io_connect_method_var_output_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
10416 if (check_result != MACH_MSG_SUCCESS)
10417 { MIG_RETURN_ERROR(OutKP, check_result); }
10418#endif /* defined(__MIG_check__Request__io_connect_method_var_output_t__defined) */
10419
10420#if UseStaticTemplates
10421 OutKP->var_output = var_outputTemplate;
10422#else /* UseStaticTemplates */
10423 OutKP->var_output.deallocate = FALSE;
10424 OutKP->var_output.copy = MACH_MSG_PHYSICAL_COPY;
10425 OutKP->var_output.pad1 = 0;
10426 OutKP->var_output.type = MACH_MSG_OOL_DESCRIPTOR;
10427#if defined(KERNEL) && !defined(__LP64__)
10428 OutKP->var_output.pad_end = 0;
10429#endif
10430#endif /* UseStaticTemplates */
10431
10432
10433 connection = iokit_lookup_connect_port(port: InKP->Head.msgh_request_port);
10434
10435 OutUP->inband_outputCnt = 4096;
10436 if (In2UP->inband_outputCnt < OutUP->inband_outputCnt)
10437 OutUP->inband_outputCnt = In2UP->inband_outputCnt;
10438
10439 scalar_outputCnt = 16;
10440 if (In2UP->scalar_outputCnt < scalar_outputCnt)
10441 scalar_outputCnt = In2UP->scalar_outputCnt;
10442
10443 RetCode = is_io_connect_method_var_output(connection, selector: In0UP->selector, scalar_input: In0UP->scalar_input, scalar_inputCnt: In0UP->scalar_inputCnt, inband_input: In1UP->inband_input, inband_inputCnt: In1UP->inband_inputCnt, ool_input: In2UP->ool_input, ool_input_size: In2UP->ool_input_size, inband_output: OutUP->inband_output, inband_outputCnt: &OutUP->inband_outputCnt, scalar_output, scalar_outputCnt: &scalar_outputCnt, var_output: (io_buf_ptr_t *)&(OutKP->var_output.address), var_outputCnt: &var_outputCnt);
10444 iokit_remove_connect_reference(obj: connection);
10445 if (RetCode != KERN_SUCCESS) {
10446 MIG_RETURN_ERROR(OutKP, RetCode);
10447 }
10448#if __MigKernelSpecificCode
10449#endif /* __MigKernelSpecificCode */
10450 OutKP->var_output.size = var_outputCnt;
10451
10452
10453 OutUP->NDR = NDR_record;
10454
10455 msgh_size_delta = _WALIGN_((OutUP->inband_outputCnt + 3) & ~3);
10456 msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4224) + msgh_size_delta;
10457 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 4096);
10458 (void)memcpy(dst: (char *) OutUP->scalar_output, src: (const char *) scalar_output, n: 8 * scalar_outputCnt);
10459 OutUP->scalar_outputCnt = scalar_outputCnt;
10460 msgh_size_delta = ((8 * scalar_outputCnt));
10461 msgh_size += msgh_size_delta;
10462 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 128);
10463 OutUP->var_outputCnt = var_outputCnt;
10464
10465 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
10466 OutKP->Head.msgh_size = msgh_size;
10467 OutKP->msgh_body.msgh_descriptor_count = 1;
10468 __AfterRcvRpc(2872, "io_connect_method_var_output")
10469}
10470
10471#if ( __MigTypeCheck )
10472#if __MIG_check__Request__iokit_subsystem__
10473#if !defined(__MIG_check__Request__io_service_get_matching_service_t__defined)
10474#define __MIG_check__Request__io_service_get_matching_service_t__defined
10475
10476mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_service_t(
10477 __attribute__((__unused__)) __RequestKData__io_service_get_matching_service_t *InKP,
10478 __attribute__((__unused__)) __RequestUData__io_service_get_matching_service_t *In0UP,
10479 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
10480{
10481
10482 typedef __Request__io_service_get_matching_service_t __Request;
10483 typedef __RequestUData__io_service_get_matching_service_t __RequestU __attribute__((unused));
10484#if __MigTypeCheck
10485 unsigned int msgh_size;
10486#endif /* __MigTypeCheck */
10487
10488#if __MigTypeCheck
10489 msgh_size = InKP->Head.msgh_size;
10490 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
10491 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
10492 return MIG_BAD_ARGUMENTS;
10493#endif /* __MigTypeCheck */
10494
10495#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_service_t__matchingCnt__defined)
10496 if (In0UP->NDR.int_rep != NDR_record.int_rep)
10497 __NDR_convert__int_rep__Request__io_service_get_matching_service_t__matchingCnt(&In0UP->matchingCnt, In0UP->NDR.int_rep);
10498#endif /* __NDR_convert__int_rep__Request__io_service_get_matching_service_t__matchingCnt__defined */
10499#if __MigTypeCheck
10500 if (In0UP->matchingCnt > 512)
10501 return MIG_BAD_ARGUMENTS;
10502 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0UP->matchingCnt) ||
10503 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0UP->matchingCnt)))
10504 return MIG_BAD_ARGUMENTS;
10505#endif /* __MigTypeCheck */
10506
10507#if __MigTypeCheck
10508 {
10509 char * msg_limit = (char *) InTrailerP;
10510#if __MigKernelSpecificCode
10511 size_t strnlen_limit;
10512#else
10513 size_t memchr_limit;
10514#endif /* __MigKernelSpecificCode */
10515
10516#if __MigKernelSpecificCode
10517 strnlen_limit = min((msg_limit - In0UP->matching), 512);
10518 if (( strnlen(s: In0UP->matching, n: strnlen_limit) >= 512 + 1 ))
10519 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
10520#else
10521 memchr_limit = min((msg_limit - In0UP->matching), 512);
10522 if (( memchr(In0UP->matching, '\0', memchr_limit) == NULL ))
10523 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
10524#endif /* __MigKernelSpecificCode */
10525 }
10526#endif /* __MigTypeCheck */
10527
10528 return MACH_MSG_SUCCESS;
10529}
10530#endif /* !defined(__MIG_check__Request__io_service_get_matching_service_t__defined) */
10531#endif /* __MIG_check__Request__iokit_subsystem__ */
10532#endif /* ( __MigTypeCheck ) */
10533
10534
10535/* Routine io_service_get_matching_service */
10536mig_internal novalue _Xio_service_get_matching_service
10537 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
10538 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10539 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
10540{
10541
10542#ifdef __MigPackStructs
10543#pragma pack(push, 4)
10544#endif
10545 typedef struct {
10546 NDR_record_t NDR;
10547 mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
10548 mach_msg_type_number_t matchingCnt;
10549 char matching[512];
10550 mach_msg_trailer_t trailer;
10551 char padding[0]; /* Avoid generating empty UData structs */
10552 } RequestU __attribute__((unused));
10553#ifdef __MigPackStructs
10554#pragma pack(pop)
10555#endif
10556 typedef __RequestKData__io_service_get_matching_service_t RequestK;
10557 typedef __RequestUData__io_service_get_matching_service_t __RequestU;
10558 typedef __ReplyKData__io_service_get_matching_service_t ReplyK __attribute__((unused));
10559 typedef __ReplyUData__io_service_get_matching_service_t ReplyU __attribute__((unused));
10560 typedef __Reply__io_service_get_matching_service_t Reply __attribute__((unused));
10561 typedef __Request__io_service_get_matching_service_t __Request __attribute__((unused));
10562
10563 /*
10564 * typedef struct {
10565 * mach_msg_header_t Head;
10566 * NDR_record_t NDR;
10567 * kern_return_t RetCode;
10568 * } mig_reply_error_t;
10569 */
10570
10571 RequestK *InKP = (RequestK *) InHeadP;
10572 RequestU *In0UP = (RequestU *) InDataP;
10573 ReplyK *OutKP = (ReplyK *) OutHeadP;
10574 ReplyU *OutUP = (ReplyU *) OutDataP;
10575 (void)OutUP;
10576#ifdef __MIG_check__Request__io_service_get_matching_service_t__defined
10577 kern_return_t check_result;
10578#endif /* __MIG_check__Request__io_service_get_matching_service_t__defined */
10579
10580#if __MigKernelSpecificCode
10581#if UseStaticTemplates
10582 const static mach_msg_port_descriptor_t serviceTemplate = {
10583 /* name = */ MACH_PORT_NULL,
10584 /* pad1 = */ 0,
10585 /* pad2 = */ 0,
10586 /* disp = */ 17,
10587 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
10588 };
10589#endif /* UseStaticTemplates */
10590
10591#else
10592#if UseStaticTemplates
10593 const static mach_msg_port_descriptor_t serviceTemplate = {
10594 /* name = */ MACH_PORT_NULL,
10595 /* pad1 = */ 0,
10596 /* pad2 = */ 0,
10597 /* disp = */ 19,
10598 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
10599 };
10600#endif /* UseStaticTemplates */
10601
10602#endif /* __MigKernelSpecificCode */
10603 kern_return_t RetCode;
10604 io_object_t service;
10605
10606 __DeclareRcvRpc(2873, "io_service_get_matching_service")
10607 __BeforeRcvRpc(2873, "io_service_get_matching_service")
10608
10609#if defined(__MIG_check__Request__io_service_get_matching_service_t__defined)
10610 check_result = __MIG_check__Request__io_service_get_matching_service_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
10611 if (check_result != MACH_MSG_SUCCESS)
10612 { MIG_RETURN_ERROR(OutKP, check_result); }
10613#endif /* defined(__MIG_check__Request__io_service_get_matching_service_t__defined) */
10614
10615#if UseStaticTemplates
10616 OutKP->service = serviceTemplate;
10617#else /* UseStaticTemplates */
10618#if __MigKernelSpecificCode
10619 OutKP->service.disposition = 17;
10620#else
10621 OutKP->service.disposition = 19;
10622#endif /* __MigKernelSpecificCode */
10623#if !(defined(KERNEL) && defined(__LP64__))
10624 OutKP->service.pad1 = 0;
10625#endif
10626 OutKP->service.pad2 = 0;
10627 OutKP->service.type = MACH_MSG_PORT_DESCRIPTOR;
10628#if defined(KERNEL)
10629 OutKP->service.pad_end = 0;
10630#endif
10631#endif /* UseStaticTemplates */
10632
10633
10634 RetCode = is_io_service_get_matching_service(main_port: InKP->Head.msgh_request_port, matching: In0UP->matching, service: &service);
10635 if (RetCode != KERN_SUCCESS) {
10636 MIG_RETURN_ERROR(OutKP, RetCode);
10637 }
10638#if __MigKernelSpecificCode
10639#endif /* __MigKernelSpecificCode */
10640 OutKP->service.name = (mach_port_t)iokit_make_object_port(obj: service);
10641
10642
10643 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
10644 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
10645 OutKP->msgh_body.msgh_descriptor_count = 1;
10646 __AfterRcvRpc(2873, "io_service_get_matching_service")
10647}
10648
10649#if ( __MigTypeCheck )
10650#if __MIG_check__Request__iokit_subsystem__
10651#if !defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined)
10652#define __MIG_check__Request__io_service_get_matching_service_ool_t__defined
10653
10654mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_service_ool_t(
10655 __attribute__((__unused__)) __RequestKData__io_service_get_matching_service_ool_t *InKP,
10656 __attribute__((__unused__)) __RequestUData__io_service_get_matching_service_ool_t *In0UP,
10657 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
10658{
10659
10660 typedef __Request__io_service_get_matching_service_ool_t __Request;
10661 typedef __RequestUData__io_service_get_matching_service_ool_t __RequestU __attribute__((unused));
10662#if __MigTypeCheck
10663 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
10664 (InKP->msgh_body.msgh_descriptor_count != 1) ||
10665 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
10666 return MIG_BAD_ARGUMENTS;
10667#endif /* __MigTypeCheck */
10668
10669#if __MigTypeCheck
10670 if (InKP->matching.type != MACH_MSG_OOL_DESCRIPTOR)
10671 return MIG_TYPE_ERROR;
10672#endif /* __MigTypeCheck */
10673
10674#if __MigTypeCheck
10675 if (InKP->matching.size != In0UP->matchingCnt)
10676 return MIG_TYPE_ERROR;
10677#endif /* __MigTypeCheck */
10678
10679 return MACH_MSG_SUCCESS;
10680}
10681#endif /* !defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined) */
10682#endif /* __MIG_check__Request__iokit_subsystem__ */
10683#endif /* ( __MigTypeCheck ) */
10684
10685
10686/* Routine io_service_get_matching_service_ool */
10687mig_internal novalue _Xio_service_get_matching_service_ool
10688 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
10689 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10690 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
10691{
10692
10693#ifdef __MigPackStructs
10694#pragma pack(push, 4)
10695#endif
10696 typedef struct {
10697 NDR_record_t NDR;
10698 mach_msg_type_number_t matchingCnt;
10699 mach_msg_trailer_t trailer;
10700 char padding[0]; /* Avoid generating empty UData structs */
10701 } RequestU __attribute__((unused));
10702#ifdef __MigPackStructs
10703#pragma pack(pop)
10704#endif
10705 typedef __RequestKData__io_service_get_matching_service_ool_t RequestK;
10706 typedef __RequestUData__io_service_get_matching_service_ool_t __RequestU;
10707 typedef __ReplyKData__io_service_get_matching_service_ool_t ReplyK __attribute__((unused));
10708 typedef __ReplyUData__io_service_get_matching_service_ool_t ReplyU __attribute__((unused));
10709 typedef __Reply__io_service_get_matching_service_ool_t Reply __attribute__((unused));
10710 typedef __Request__io_service_get_matching_service_ool_t __Request __attribute__((unused));
10711
10712 /*
10713 * typedef struct {
10714 * mach_msg_header_t Head;
10715 * NDR_record_t NDR;
10716 * kern_return_t RetCode;
10717 * } mig_reply_error_t;
10718 */
10719
10720 RequestK *InKP = (RequestK *) InHeadP;
10721 RequestU *In0UP = (RequestU *) InDataP;
10722 ReplyK *OutKP = (ReplyK *) OutHeadP;
10723 ReplyU *OutUP = (ReplyU *) OutDataP;
10724 (void)OutUP;
10725#ifdef __MIG_check__Request__io_service_get_matching_service_ool_t__defined
10726 kern_return_t check_result;
10727#endif /* __MIG_check__Request__io_service_get_matching_service_ool_t__defined */
10728
10729#if __MigKernelSpecificCode
10730#if UseStaticTemplates
10731 const static mach_msg_port_descriptor_t serviceTemplate = {
10732 /* name = */ MACH_PORT_NULL,
10733 /* pad1 = */ 0,
10734 /* pad2 = */ 0,
10735 /* disp = */ 17,
10736 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
10737 };
10738#endif /* UseStaticTemplates */
10739
10740#else
10741#if UseStaticTemplates
10742 const static mach_msg_port_descriptor_t serviceTemplate = {
10743 /* name = */ MACH_PORT_NULL,
10744 /* pad1 = */ 0,
10745 /* pad2 = */ 0,
10746 /* disp = */ 19,
10747 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
10748 };
10749#endif /* UseStaticTemplates */
10750
10751#endif /* __MigKernelSpecificCode */
10752 kern_return_t RetCode;
10753 io_object_t service;
10754
10755 __DeclareRcvRpc(2874, "io_service_get_matching_service_ool")
10756 __BeforeRcvRpc(2874, "io_service_get_matching_service_ool")
10757
10758#if defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined)
10759 check_result = __MIG_check__Request__io_service_get_matching_service_ool_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
10760 if (check_result != MACH_MSG_SUCCESS)
10761 { MIG_RETURN_ERROR(OutKP, check_result); }
10762#endif /* defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined) */
10763
10764#if UseStaticTemplates
10765 OutKP->service = serviceTemplate;
10766#else /* UseStaticTemplates */
10767#if __MigKernelSpecificCode
10768 OutKP->service.disposition = 17;
10769#else
10770 OutKP->service.disposition = 19;
10771#endif /* __MigKernelSpecificCode */
10772#if !(defined(KERNEL) && defined(__LP64__))
10773 OutKP->service.pad1 = 0;
10774#endif
10775 OutKP->service.pad2 = 0;
10776 OutKP->service.type = MACH_MSG_PORT_DESCRIPTOR;
10777#if defined(KERNEL)
10778 OutKP->service.pad_end = 0;
10779#endif
10780#endif /* UseStaticTemplates */
10781
10782
10783 RetCode = is_io_service_get_matching_service_ool(main_port: InKP->Head.msgh_request_port, matching: (io_buf_ptr_t)(InKP->matching.address), matchingCnt: InKP->matching.size, result: &OutUP->result, service: &service);
10784 if (RetCode != KERN_SUCCESS) {
10785 MIG_RETURN_ERROR(OutKP, RetCode);
10786 }
10787#if __MigKernelSpecificCode
10788#endif /* __MigKernelSpecificCode */
10789 OutKP->service.name = (mach_port_t)iokit_make_object_port(obj: service);
10790
10791
10792 OutUP->NDR = NDR_record;
10793
10794
10795 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
10796 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
10797 OutKP->msgh_body.msgh_descriptor_count = 1;
10798 __AfterRcvRpc(2874, "io_service_get_matching_service_ool")
10799}
10800
10801#if ( __MigTypeCheck )
10802#if __MIG_check__Request__iokit_subsystem__
10803#if !defined(__MIG_check__Request__io_service_get_authorization_id_t__defined)
10804#define __MIG_check__Request__io_service_get_authorization_id_t__defined
10805
10806mig_internal kern_return_t __MIG_check__Request__io_service_get_authorization_id_t(
10807 __attribute__((__unused__)) __RequestKData__io_service_get_authorization_id_t *InKP,
10808 __attribute__((__unused__)) __RequestUData__io_service_get_authorization_id_t *In0UP,
10809 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
10810{
10811
10812 typedef __Request__io_service_get_authorization_id_t __Request;
10813 typedef __RequestUData__io_service_get_authorization_id_t __RequestU __attribute__((unused));
10814#if __MigTypeCheck
10815 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
10816 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
10817 return MIG_BAD_ARGUMENTS;
10818#endif /* __MigTypeCheck */
10819
10820 return MACH_MSG_SUCCESS;
10821}
10822#endif /* !defined(__MIG_check__Request__io_service_get_authorization_id_t__defined) */
10823#endif /* __MIG_check__Request__iokit_subsystem__ */
10824#endif /* ( __MigTypeCheck ) */
10825
10826
10827/* Routine io_service_get_authorization_id */
10828mig_internal novalue _Xio_service_get_authorization_id
10829 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
10830 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10831 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
10832{
10833
10834#ifdef __MigPackStructs
10835#pragma pack(push, 4)
10836#endif
10837 typedef struct {
10838 mach_msg_trailer_t trailer;
10839 char padding[0]; /* Avoid generating empty UData structs */
10840 } RequestU __attribute__((unused));
10841#ifdef __MigPackStructs
10842#pragma pack(pop)
10843#endif
10844 typedef __RequestKData__io_service_get_authorization_id_t RequestK;
10845 typedef __RequestUData__io_service_get_authorization_id_t __RequestU;
10846 typedef __ReplyKData__io_service_get_authorization_id_t ReplyK __attribute__((unused));
10847 typedef __ReplyUData__io_service_get_authorization_id_t ReplyU __attribute__((unused));
10848 typedef __Reply__io_service_get_authorization_id_t Reply __attribute__((unused));
10849 typedef __Request__io_service_get_authorization_id_t __Request __attribute__((unused));
10850
10851 /*
10852 * typedef struct {
10853 * mach_msg_header_t Head;
10854 * NDR_record_t NDR;
10855 * kern_return_t RetCode;
10856 * } mig_reply_error_t;
10857 */
10858
10859 RequestK *InKP = (RequestK *) InHeadP;
10860 RequestU *In0UP = (RequestU *) InDataP;
10861 ReplyK *OutKP = (ReplyK *) OutHeadP;
10862 ReplyU *OutUP = (ReplyU *) OutDataP;
10863 (void)OutUP;
10864#ifdef __MIG_check__Request__io_service_get_authorization_id_t__defined
10865 kern_return_t check_result;
10866#endif /* __MIG_check__Request__io_service_get_authorization_id_t__defined */
10867
10868#if __MigKernelSpecificCode
10869#else
10870#endif /* __MigKernelSpecificCode */
10871 io_object_t service;
10872
10873 __DeclareRcvRpc(2875, "io_service_get_authorization_id")
10874 __BeforeRcvRpc(2875, "io_service_get_authorization_id")
10875
10876#if defined(__MIG_check__Request__io_service_get_authorization_id_t__defined)
10877 check_result = __MIG_check__Request__io_service_get_authorization_id_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
10878 if (check_result != MACH_MSG_SUCCESS)
10879 { MIG_RETURN_ERROR(OutKP, check_result); }
10880#endif /* defined(__MIG_check__Request__io_service_get_authorization_id_t__defined) */
10881
10882 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
10883
10884 OutUP->RetCode = is_io_service_get_authorization_id(service, authorization_id: &OutUP->authorization_id);
10885 iokit_remove_reference(obj: service);
10886 if (OutUP->RetCode != KERN_SUCCESS) {
10887 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
10888 }
10889#if __MigKernelSpecificCode
10890#endif /* __MigKernelSpecificCode */
10891
10892 OutUP->NDR = NDR_record;
10893
10894
10895 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
10896 __AfterRcvRpc(2875, "io_service_get_authorization_id")
10897}
10898
10899#if ( __MigTypeCheck )
10900#if __MIG_check__Request__iokit_subsystem__
10901#if !defined(__MIG_check__Request__io_service_set_authorization_id_t__defined)
10902#define __MIG_check__Request__io_service_set_authorization_id_t__defined
10903
10904mig_internal kern_return_t __MIG_check__Request__io_service_set_authorization_id_t(
10905 __attribute__((__unused__)) __RequestKData__io_service_set_authorization_id_t *InKP,
10906 __attribute__((__unused__)) __RequestUData__io_service_set_authorization_id_t *In0UP,
10907 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
10908{
10909
10910 typedef __Request__io_service_set_authorization_id_t __Request;
10911 typedef __RequestUData__io_service_set_authorization_id_t __RequestU __attribute__((unused));
10912#if __MigTypeCheck
10913 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
10914 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
10915 return MIG_BAD_ARGUMENTS;
10916#endif /* __MigTypeCheck */
10917
10918 return MACH_MSG_SUCCESS;
10919}
10920#endif /* !defined(__MIG_check__Request__io_service_set_authorization_id_t__defined) */
10921#endif /* __MIG_check__Request__iokit_subsystem__ */
10922#endif /* ( __MigTypeCheck ) */
10923
10924
10925/* Routine io_service_set_authorization_id */
10926mig_internal novalue _Xio_service_set_authorization_id
10927 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
10928 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
10929 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
10930{
10931
10932#ifdef __MigPackStructs
10933#pragma pack(push, 4)
10934#endif
10935 typedef struct {
10936 NDR_record_t NDR;
10937 uint64_t authorization_id;
10938 mach_msg_trailer_t trailer;
10939 char padding[0]; /* Avoid generating empty UData structs */
10940 } RequestU __attribute__((unused));
10941#ifdef __MigPackStructs
10942#pragma pack(pop)
10943#endif
10944 typedef __RequestKData__io_service_set_authorization_id_t RequestK;
10945 typedef __RequestUData__io_service_set_authorization_id_t __RequestU;
10946 typedef __ReplyKData__io_service_set_authorization_id_t ReplyK __attribute__((unused));
10947 typedef __ReplyUData__io_service_set_authorization_id_t ReplyU __attribute__((unused));
10948 typedef __Reply__io_service_set_authorization_id_t Reply __attribute__((unused));
10949 typedef __Request__io_service_set_authorization_id_t __Request __attribute__((unused));
10950
10951 /*
10952 * typedef struct {
10953 * mach_msg_header_t Head;
10954 * NDR_record_t NDR;
10955 * kern_return_t RetCode;
10956 * } mig_reply_error_t;
10957 */
10958
10959 RequestK *InKP = (RequestK *) InHeadP;
10960 RequestU *In0UP = (RequestU *) InDataP;
10961 ReplyK *OutKP = (ReplyK *) OutHeadP;
10962 ReplyU *OutUP = (ReplyU *) OutDataP;
10963 (void)OutUP;
10964#ifdef __MIG_check__Request__io_service_set_authorization_id_t__defined
10965 kern_return_t check_result;
10966#endif /* __MIG_check__Request__io_service_set_authorization_id_t__defined */
10967
10968#if __MigKernelSpecificCode
10969#else
10970#endif /* __MigKernelSpecificCode */
10971 io_object_t service;
10972
10973 __DeclareRcvRpc(2876, "io_service_set_authorization_id")
10974 __BeforeRcvRpc(2876, "io_service_set_authorization_id")
10975
10976#if defined(__MIG_check__Request__io_service_set_authorization_id_t__defined)
10977 check_result = __MIG_check__Request__io_service_set_authorization_id_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
10978 if (check_result != MACH_MSG_SUCCESS)
10979 { MIG_RETURN_ERROR(OutKP, check_result); }
10980#endif /* defined(__MIG_check__Request__io_service_set_authorization_id_t__defined) */
10981
10982 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
10983
10984 OutUP->RetCode = is_io_service_set_authorization_id(service, authorization_id: In0UP->authorization_id);
10985 iokit_remove_reference(obj: service);
10986#if __MigKernelSpecificCode
10987#endif /* __MigKernelSpecificCode */
10988
10989 OutUP->NDR = NDR_record;
10990
10991
10992 __AfterRcvRpc(2876, "io_service_set_authorization_id")
10993}
10994
10995#if ( __MigTypeCheck )
10996#if __MIG_check__Request__iokit_subsystem__
10997#if !defined(__MIG_check__Request__io_server_version_t__defined)
10998#define __MIG_check__Request__io_server_version_t__defined
10999
11000mig_internal kern_return_t __MIG_check__Request__io_server_version_t(
11001 __attribute__((__unused__)) __RequestKData__io_server_version_t *InKP,
11002 __attribute__((__unused__)) __RequestUData__io_server_version_t *In0UP,
11003 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
11004{
11005
11006 typedef __Request__io_server_version_t __Request;
11007 typedef __RequestUData__io_server_version_t __RequestU __attribute__((unused));
11008#if __MigTypeCheck
11009 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
11010 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
11011 return MIG_BAD_ARGUMENTS;
11012#endif /* __MigTypeCheck */
11013
11014 return MACH_MSG_SUCCESS;
11015}
11016#endif /* !defined(__MIG_check__Request__io_server_version_t__defined) */
11017#endif /* __MIG_check__Request__iokit_subsystem__ */
11018#endif /* ( __MigTypeCheck ) */
11019
11020
11021/* Routine io_server_version */
11022mig_internal novalue _Xio_server_version
11023 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
11024 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11025 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
11026{
11027
11028#ifdef __MigPackStructs
11029#pragma pack(push, 4)
11030#endif
11031 typedef struct {
11032 mach_msg_trailer_t trailer;
11033 char padding[0]; /* Avoid generating empty UData structs */
11034 } RequestU __attribute__((unused));
11035#ifdef __MigPackStructs
11036#pragma pack(pop)
11037#endif
11038 typedef __RequestKData__io_server_version_t RequestK;
11039 typedef __RequestUData__io_server_version_t __RequestU;
11040 typedef __ReplyKData__io_server_version_t ReplyK __attribute__((unused));
11041 typedef __ReplyUData__io_server_version_t ReplyU __attribute__((unused));
11042 typedef __Reply__io_server_version_t Reply __attribute__((unused));
11043 typedef __Request__io_server_version_t __Request __attribute__((unused));
11044
11045 /*
11046 * typedef struct {
11047 * mach_msg_header_t Head;
11048 * NDR_record_t NDR;
11049 * kern_return_t RetCode;
11050 * } mig_reply_error_t;
11051 */
11052
11053 RequestK *InKP = (RequestK *) InHeadP;
11054 RequestU *In0UP = (RequestU *) InDataP;
11055 ReplyK *OutKP = (ReplyK *) OutHeadP;
11056 ReplyU *OutUP = (ReplyU *) OutDataP;
11057 (void)OutUP;
11058#ifdef __MIG_check__Request__io_server_version_t__defined
11059 kern_return_t check_result;
11060#endif /* __MIG_check__Request__io_server_version_t__defined */
11061
11062#if __MigKernelSpecificCode
11063#else
11064#endif /* __MigKernelSpecificCode */
11065 __DeclareRcvRpc(2877, "io_server_version")
11066 __BeforeRcvRpc(2877, "io_server_version")
11067
11068#if defined(__MIG_check__Request__io_server_version_t__defined)
11069 check_result = __MIG_check__Request__io_server_version_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
11070 if (check_result != MACH_MSG_SUCCESS)
11071 { MIG_RETURN_ERROR(OutKP, check_result); }
11072#endif /* defined(__MIG_check__Request__io_server_version_t__defined) */
11073
11074 OutUP->RetCode = is_io_server_version(main_port: InKP->Head.msgh_request_port, version: &OutUP->version);
11075 if (OutUP->RetCode != KERN_SUCCESS) {
11076 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
11077 }
11078#if __MigKernelSpecificCode
11079#endif /* __MigKernelSpecificCode */
11080
11081 OutUP->NDR = NDR_record;
11082
11083
11084 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
11085 __AfterRcvRpc(2877, "io_server_version")
11086}
11087
11088#if ( __MigTypeCheck )
11089#if __MIG_check__Request__iokit_subsystem__
11090#if !defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined)
11091#define __MIG_check__Request__io_registry_entry_get_properties_bin_t__defined
11092
11093mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_properties_bin_t(
11094 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_properties_bin_t *InKP,
11095 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_properties_bin_t *In0UP,
11096 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
11097{
11098
11099 typedef __Request__io_registry_entry_get_properties_bin_t __Request;
11100 typedef __RequestUData__io_registry_entry_get_properties_bin_t __RequestU __attribute__((unused));
11101#if __MigTypeCheck
11102 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
11103 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
11104 return MIG_BAD_ARGUMENTS;
11105#endif /* __MigTypeCheck */
11106
11107 return MACH_MSG_SUCCESS;
11108}
11109#endif /* !defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined) */
11110#endif /* __MIG_check__Request__iokit_subsystem__ */
11111#endif /* ( __MigTypeCheck ) */
11112
11113
11114/* Routine io_registry_entry_get_properties_bin */
11115mig_internal novalue _Xio_registry_entry_get_properties_bin
11116 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
11117 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11118 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
11119{
11120
11121#ifdef __MigPackStructs
11122#pragma pack(push, 4)
11123#endif
11124 typedef struct {
11125 mach_msg_trailer_t trailer;
11126 char padding[0]; /* Avoid generating empty UData structs */
11127 } RequestU __attribute__((unused));
11128#ifdef __MigPackStructs
11129#pragma pack(pop)
11130#endif
11131 typedef __RequestKData__io_registry_entry_get_properties_bin_t RequestK;
11132 typedef __RequestUData__io_registry_entry_get_properties_bin_t __RequestU;
11133 typedef __ReplyKData__io_registry_entry_get_properties_bin_t ReplyK __attribute__((unused));
11134 typedef __ReplyUData__io_registry_entry_get_properties_bin_t ReplyU __attribute__((unused));
11135 typedef __Reply__io_registry_entry_get_properties_bin_t Reply __attribute__((unused));
11136 typedef __Request__io_registry_entry_get_properties_bin_t __Request __attribute__((unused));
11137
11138 /*
11139 * typedef struct {
11140 * mach_msg_header_t Head;
11141 * NDR_record_t NDR;
11142 * kern_return_t RetCode;
11143 * } mig_reply_error_t;
11144 */
11145
11146 RequestK *InKP = (RequestK *) InHeadP;
11147 RequestU *In0UP = (RequestU *) InDataP;
11148 ReplyK *OutKP = (ReplyK *) OutHeadP;
11149 ReplyU *OutUP = (ReplyU *) OutDataP;
11150 (void)OutUP;
11151#ifdef __MIG_check__Request__io_registry_entry_get_properties_bin_t__defined
11152 kern_return_t check_result;
11153#endif /* __MIG_check__Request__io_registry_entry_get_properties_bin_t__defined */
11154
11155#if __MigKernelSpecificCode
11156#if UseStaticTemplates
11157 const static mach_msg_ool_descriptor_t propertiesTemplate = {
11158 /* addr = */ (void *)0,
11159 /* size = */ 0,
11160 /* deal = */ FALSE,
11161 /* copy = */ MACH_MSG_PHYSICAL_COPY,
11162 /* pad2 = */ 0,
11163 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
11164 };
11165#endif /* UseStaticTemplates */
11166
11167#else
11168#if UseStaticTemplates
11169 const static mach_msg_ool_descriptor_t propertiesTemplate = {
11170 /* addr = */ (void *)0,
11171 /* size = */ 0,
11172 /* deal = */ FALSE,
11173 /* copy = */ MACH_MSG_PHYSICAL_COPY,
11174 /* pad2 = */ 0,
11175 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
11176 };
11177#endif /* UseStaticTemplates */
11178
11179#endif /* __MigKernelSpecificCode */
11180 kern_return_t RetCode;
11181 io_object_t registry_entry;
11182
11183 __DeclareRcvRpc(2878, "io_registry_entry_get_properties_bin")
11184 __BeforeRcvRpc(2878, "io_registry_entry_get_properties_bin")
11185
11186#if defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined)
11187 check_result = __MIG_check__Request__io_registry_entry_get_properties_bin_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
11188 if (check_result != MACH_MSG_SUCCESS)
11189 { MIG_RETURN_ERROR(OutKP, check_result); }
11190#endif /* defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined) */
11191
11192#if UseStaticTemplates
11193 OutKP->properties = propertiesTemplate;
11194#else /* UseStaticTemplates */
11195 OutKP->properties.deallocate = FALSE;
11196 OutKP->properties.copy = MACH_MSG_PHYSICAL_COPY;
11197 OutKP->properties.pad1 = 0;
11198 OutKP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
11199#if defined(KERNEL) && !defined(__LP64__)
11200 OutKP->properties.pad_end = 0;
11201#endif
11202#endif /* UseStaticTemplates */
11203
11204
11205 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
11206
11207 RetCode = is_io_registry_entry_get_properties_bin(registry_entry, properties: (io_buf_ptr_t *)&(OutKP->properties.address), propertiesCnt: &OutUP->propertiesCnt);
11208 iokit_remove_reference(obj: registry_entry);
11209 if (RetCode != KERN_SUCCESS) {
11210 MIG_RETURN_ERROR(OutKP, RetCode);
11211 }
11212#if __MigKernelSpecificCode
11213#endif /* __MigKernelSpecificCode */
11214 OutKP->properties.size = OutUP->propertiesCnt;
11215
11216
11217 OutUP->NDR = NDR_record;
11218
11219
11220 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
11221 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
11222 OutKP->msgh_body.msgh_descriptor_count = 1;
11223 __AfterRcvRpc(2878, "io_registry_entry_get_properties_bin")
11224}
11225
11226#if ( __MigTypeCheck )
11227#if __MIG_check__Request__iokit_subsystem__
11228#if !defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined)
11229#define __MIG_check__Request__io_registry_entry_get_property_bin_t__defined
11230
11231mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_bin_t(
11232 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_property_bin_t *InKP,
11233 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bin_t *In0UP,
11234 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11235 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bin_t **In1UPP,
11236 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bin_t **In2UPP)
11237{
11238
11239 typedef __Request__io_registry_entry_get_property_bin_t __Request;
11240 typedef __RequestUData__io_registry_entry_get_property_bin_t __RequestU __attribute__((unused));
11241 __RequestU *In1UP;
11242 __RequestU *In2UP;
11243#if __MigTypeCheck
11244 unsigned int msgh_size;
11245#endif /* __MigTypeCheck */
11246 unsigned int msgh_size_delta;
11247
11248#if __MigTypeCheck
11249 msgh_size = InKP->Head.msgh_size;
11250 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
11251 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
11252 return MIG_BAD_ARGUMENTS;
11253#endif /* __MigTypeCheck */
11254
11255#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__planeCnt__defined)
11256 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11257 __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
11258#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__planeCnt__defined */
11259 msgh_size_delta = _WALIGN_(In0UP->planeCnt);
11260#if __MigTypeCheck
11261 if (In0UP->planeCnt > 128)
11262 return MIG_BAD_ARGUMENTS;
11263 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In0UP->planeCnt) ||
11264 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In0UP->planeCnt)))
11265 return MIG_BAD_ARGUMENTS;
11266 msgh_size -= msgh_size_delta;
11267#endif /* __MigTypeCheck */
11268
11269 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
11270
11271#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__property_nameCnt__defined)
11272 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11273 __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__property_nameCnt(&In1UP->property_nameCnt, In1UP->NDR.int_rep);
11274#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__property_nameCnt__defined */
11275 msgh_size_delta = _WALIGN_(In1UP->property_nameCnt);
11276#if __MigTypeCheck
11277 if (In1UP->property_nameCnt > 128)
11278 return MIG_BAD_ARGUMENTS;
11279 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In1UP->property_nameCnt) ||
11280 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In1UP->property_nameCnt)))
11281 return MIG_BAD_ARGUMENTS;
11282#endif /* __MigTypeCheck */
11283
11284 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 128);
11285
11286#if __MigTypeCheck
11287 {
11288 char * msg_limit = (char *) InTrailerP;
11289#if __MigKernelSpecificCode
11290 size_t strnlen_limit;
11291#else
11292 size_t memchr_limit;
11293#endif /* __MigKernelSpecificCode */
11294
11295#if __MigKernelSpecificCode
11296 strnlen_limit = min((msg_limit - In0UP->plane), 128);
11297 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
11298 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
11299#else
11300 memchr_limit = min((msg_limit - In0UP->plane), 128);
11301 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
11302 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
11303#endif /* __MigKernelSpecificCode */
11304#if __MigKernelSpecificCode
11305 strnlen_limit = min((msg_limit - In1UP->property_name), 128);
11306 if (( strnlen(s: In1UP->property_name, n: strnlen_limit) >= 128 + 1 ))
11307 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
11308#else
11309 memchr_limit = min((msg_limit - In1UP->property_name), 128);
11310 if (( memchr(In1UP->property_name, '\0', memchr_limit) == NULL ))
11311 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
11312#endif /* __MigKernelSpecificCode */
11313 }
11314#endif /* __MigTypeCheck */
11315
11316 return MACH_MSG_SUCCESS;
11317}
11318#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined) */
11319#endif /* __MIG_check__Request__iokit_subsystem__ */
11320#endif /* ( __MigTypeCheck ) */
11321
11322
11323/* Routine io_registry_entry_get_property_bin */
11324mig_internal novalue _Xio_registry_entry_get_property_bin
11325 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
11326 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11327 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
11328{
11329
11330#ifdef __MigPackStructs
11331#pragma pack(push, 4)
11332#endif
11333 typedef struct {
11334 NDR_record_t NDR;
11335 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
11336 mach_msg_type_number_t planeCnt;
11337 char plane[128];
11338 mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
11339 mach_msg_type_number_t property_nameCnt;
11340 char property_name[128];
11341 uint32_t options;
11342 mach_msg_trailer_t trailer;
11343 char padding[0]; /* Avoid generating empty UData structs */
11344 } RequestU __attribute__((unused));
11345#ifdef __MigPackStructs
11346#pragma pack(pop)
11347#endif
11348 typedef __RequestKData__io_registry_entry_get_property_bin_t RequestK;
11349 typedef __RequestUData__io_registry_entry_get_property_bin_t __RequestU;
11350 typedef __ReplyKData__io_registry_entry_get_property_bin_t ReplyK __attribute__((unused));
11351 typedef __ReplyUData__io_registry_entry_get_property_bin_t ReplyU __attribute__((unused));
11352 typedef __Reply__io_registry_entry_get_property_bin_t Reply __attribute__((unused));
11353 typedef __Request__io_registry_entry_get_property_bin_t __Request __attribute__((unused));
11354
11355 /*
11356 * typedef struct {
11357 * mach_msg_header_t Head;
11358 * NDR_record_t NDR;
11359 * kern_return_t RetCode;
11360 * } mig_reply_error_t;
11361 */
11362
11363 RequestK *InKP = (RequestK *) InHeadP;
11364 RequestU *In0UP = (RequestU *) InDataP;
11365 RequestU *In1UP;
11366 RequestU *In2UP;
11367 ReplyK *OutKP = (ReplyK *) OutHeadP;
11368 ReplyU *OutUP = (ReplyU *) OutDataP;
11369 (void)OutUP;
11370#ifdef __MIG_check__Request__io_registry_entry_get_property_bin_t__defined
11371 kern_return_t check_result;
11372#endif /* __MIG_check__Request__io_registry_entry_get_property_bin_t__defined */
11373
11374#if __MigKernelSpecificCode
11375#if UseStaticTemplates
11376 const static mach_msg_ool_descriptor_t propertiesTemplate = {
11377 /* addr = */ (void *)0,
11378 /* size = */ 0,
11379 /* deal = */ FALSE,
11380 /* copy = */ MACH_MSG_PHYSICAL_COPY,
11381 /* pad2 = */ 0,
11382 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
11383 };
11384#endif /* UseStaticTemplates */
11385
11386#else
11387#if UseStaticTemplates
11388 const static mach_msg_ool_descriptor_t propertiesTemplate = {
11389 /* addr = */ (void *)0,
11390 /* size = */ 0,
11391 /* deal = */ FALSE,
11392 /* copy = */ MACH_MSG_PHYSICAL_COPY,
11393 /* pad2 = */ 0,
11394 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
11395 };
11396#endif /* UseStaticTemplates */
11397
11398#endif /* __MigKernelSpecificCode */
11399 kern_return_t RetCode;
11400 io_object_t registry_entry;
11401
11402 __DeclareRcvRpc(2879, "io_registry_entry_get_property_bin")
11403 __BeforeRcvRpc(2879, "io_registry_entry_get_property_bin")
11404
11405#if defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined)
11406 check_result = __MIG_check__Request__io_registry_entry_get_property_bin_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
11407 if (check_result != MACH_MSG_SUCCESS)
11408 { MIG_RETURN_ERROR(OutKP, check_result); }
11409#endif /* defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined) */
11410
11411#if UseStaticTemplates
11412 OutKP->properties = propertiesTemplate;
11413#else /* UseStaticTemplates */
11414 OutKP->properties.deallocate = FALSE;
11415 OutKP->properties.copy = MACH_MSG_PHYSICAL_COPY;
11416 OutKP->properties.pad1 = 0;
11417 OutKP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
11418#if defined(KERNEL) && !defined(__LP64__)
11419 OutKP->properties.pad_end = 0;
11420#endif
11421#endif /* UseStaticTemplates */
11422
11423
11424 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
11425
11426 RetCode = is_io_registry_entry_get_property_bin(registry_entry, plane: In0UP->plane, property_name: In1UP->property_name, options: In2UP->options, properties: (io_buf_ptr_t *)&(OutKP->properties.address), propertiesCnt: &OutUP->propertiesCnt);
11427 iokit_remove_reference(obj: registry_entry);
11428 if (RetCode != KERN_SUCCESS) {
11429 MIG_RETURN_ERROR(OutKP, RetCode);
11430 }
11431#if __MigKernelSpecificCode
11432#endif /* __MigKernelSpecificCode */
11433 OutKP->properties.size = OutUP->propertiesCnt;
11434
11435
11436 OutUP->NDR = NDR_record;
11437
11438
11439 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
11440 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
11441 OutKP->msgh_body.msgh_descriptor_count = 1;
11442 __AfterRcvRpc(2879, "io_registry_entry_get_property_bin")
11443}
11444
11445#if ( __MigTypeCheck )
11446#if __MIG_check__Request__iokit_subsystem__
11447#if !defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined)
11448#define __MIG_check__Request__io_service_get_matching_service_bin_t__defined
11449
11450mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_service_bin_t(
11451 __attribute__((__unused__)) __RequestKData__io_service_get_matching_service_bin_t *InKP,
11452 __attribute__((__unused__)) __RequestUData__io_service_get_matching_service_bin_t *In0UP,
11453 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
11454{
11455
11456 typedef __Request__io_service_get_matching_service_bin_t __Request;
11457 typedef __RequestUData__io_service_get_matching_service_bin_t __RequestU __attribute__((unused));
11458#if __MigTypeCheck
11459 unsigned int msgh_size;
11460#endif /* __MigTypeCheck */
11461
11462#if __MigTypeCheck
11463 msgh_size = InKP->Head.msgh_size;
11464 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
11465 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
11466 return MIG_BAD_ARGUMENTS;
11467#endif /* __MigTypeCheck */
11468
11469#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_service_bin_t__matchingCnt__defined)
11470 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11471 __NDR_convert__int_rep__Request__io_service_get_matching_service_bin_t__matchingCnt(&In0UP->matchingCnt, In0UP->NDR.int_rep);
11472#endif /* __NDR_convert__int_rep__Request__io_service_get_matching_service_bin_t__matchingCnt__defined */
11473#if __MigTypeCheck
11474 if (In0UP->matchingCnt > 4096)
11475 return MIG_BAD_ARGUMENTS;
11476 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0UP->matchingCnt) ||
11477 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0UP->matchingCnt)))
11478 return MIG_BAD_ARGUMENTS;
11479#endif /* __MigTypeCheck */
11480
11481 return MACH_MSG_SUCCESS;
11482}
11483#endif /* !defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined) */
11484#endif /* __MIG_check__Request__iokit_subsystem__ */
11485#endif /* ( __MigTypeCheck ) */
11486
11487
11488/* Routine io_service_get_matching_service_bin */
11489mig_internal novalue _Xio_service_get_matching_service_bin
11490 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
11491 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11492 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
11493{
11494
11495#ifdef __MigPackStructs
11496#pragma pack(push, 4)
11497#endif
11498 typedef struct {
11499 NDR_record_t NDR;
11500 mach_msg_type_number_t matchingCnt;
11501 char matching[4096];
11502 mach_msg_trailer_t trailer;
11503 char padding[0]; /* Avoid generating empty UData structs */
11504 } RequestU __attribute__((unused));
11505#ifdef __MigPackStructs
11506#pragma pack(pop)
11507#endif
11508 typedef __RequestKData__io_service_get_matching_service_bin_t RequestK;
11509 typedef __RequestUData__io_service_get_matching_service_bin_t __RequestU;
11510 typedef __ReplyKData__io_service_get_matching_service_bin_t ReplyK __attribute__((unused));
11511 typedef __ReplyUData__io_service_get_matching_service_bin_t ReplyU __attribute__((unused));
11512 typedef __Reply__io_service_get_matching_service_bin_t Reply __attribute__((unused));
11513 typedef __Request__io_service_get_matching_service_bin_t __Request __attribute__((unused));
11514
11515 /*
11516 * typedef struct {
11517 * mach_msg_header_t Head;
11518 * NDR_record_t NDR;
11519 * kern_return_t RetCode;
11520 * } mig_reply_error_t;
11521 */
11522
11523 RequestK *InKP = (RequestK *) InHeadP;
11524 RequestU *In0UP = (RequestU *) InDataP;
11525 ReplyK *OutKP = (ReplyK *) OutHeadP;
11526 ReplyU *OutUP = (ReplyU *) OutDataP;
11527 (void)OutUP;
11528#ifdef __MIG_check__Request__io_service_get_matching_service_bin_t__defined
11529 kern_return_t check_result;
11530#endif /* __MIG_check__Request__io_service_get_matching_service_bin_t__defined */
11531
11532#if __MigKernelSpecificCode
11533#if UseStaticTemplates
11534 const static mach_msg_port_descriptor_t serviceTemplate = {
11535 /* name = */ MACH_PORT_NULL,
11536 /* pad1 = */ 0,
11537 /* pad2 = */ 0,
11538 /* disp = */ 17,
11539 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
11540 };
11541#endif /* UseStaticTemplates */
11542
11543#else
11544#if UseStaticTemplates
11545 const static mach_msg_port_descriptor_t serviceTemplate = {
11546 /* name = */ MACH_PORT_NULL,
11547 /* pad1 = */ 0,
11548 /* pad2 = */ 0,
11549 /* disp = */ 19,
11550 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
11551 };
11552#endif /* UseStaticTemplates */
11553
11554#endif /* __MigKernelSpecificCode */
11555 kern_return_t RetCode;
11556 io_object_t service;
11557
11558 __DeclareRcvRpc(2880, "io_service_get_matching_service_bin")
11559 __BeforeRcvRpc(2880, "io_service_get_matching_service_bin")
11560
11561#if defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined)
11562 check_result = __MIG_check__Request__io_service_get_matching_service_bin_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
11563 if (check_result != MACH_MSG_SUCCESS)
11564 { MIG_RETURN_ERROR(OutKP, check_result); }
11565#endif /* defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined) */
11566
11567#if UseStaticTemplates
11568 OutKP->service = serviceTemplate;
11569#else /* UseStaticTemplates */
11570#if __MigKernelSpecificCode
11571 OutKP->service.disposition = 17;
11572#else
11573 OutKP->service.disposition = 19;
11574#endif /* __MigKernelSpecificCode */
11575#if !(defined(KERNEL) && defined(__LP64__))
11576 OutKP->service.pad1 = 0;
11577#endif
11578 OutKP->service.pad2 = 0;
11579 OutKP->service.type = MACH_MSG_PORT_DESCRIPTOR;
11580#if defined(KERNEL)
11581 OutKP->service.pad_end = 0;
11582#endif
11583#endif /* UseStaticTemplates */
11584
11585
11586 RetCode = is_io_service_get_matching_service_bin(main_port: InKP->Head.msgh_request_port, matching: In0UP->matching, matchingCnt: In0UP->matchingCnt, service: &service);
11587 if (RetCode != KERN_SUCCESS) {
11588 MIG_RETURN_ERROR(OutKP, RetCode);
11589 }
11590#if __MigKernelSpecificCode
11591#endif /* __MigKernelSpecificCode */
11592 OutKP->service.name = (mach_port_t)iokit_make_object_port(obj: service);
11593
11594
11595 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
11596 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
11597 OutKP->msgh_body.msgh_descriptor_count = 1;
11598 __AfterRcvRpc(2880, "io_service_get_matching_service_bin")
11599}
11600
11601#if ( __MigTypeCheck )
11602#if __MIG_check__Request__iokit_subsystem__
11603#if !defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined)
11604#define __MIG_check__Request__io_service_get_matching_services_bin_t__defined
11605
11606mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_services_bin_t(
11607 __attribute__((__unused__)) __RequestKData__io_service_get_matching_services_bin_t *InKP,
11608 __attribute__((__unused__)) __RequestUData__io_service_get_matching_services_bin_t *In0UP,
11609 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
11610{
11611
11612 typedef __Request__io_service_get_matching_services_bin_t __Request;
11613 typedef __RequestUData__io_service_get_matching_services_bin_t __RequestU __attribute__((unused));
11614#if __MigTypeCheck
11615 unsigned int msgh_size;
11616#endif /* __MigTypeCheck */
11617
11618#if __MigTypeCheck
11619 msgh_size = InKP->Head.msgh_size;
11620 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
11621 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
11622 return MIG_BAD_ARGUMENTS;
11623#endif /* __MigTypeCheck */
11624
11625#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_services_bin_t__matchingCnt__defined)
11626 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11627 __NDR_convert__int_rep__Request__io_service_get_matching_services_bin_t__matchingCnt(&In0UP->matchingCnt, In0UP->NDR.int_rep);
11628#endif /* __NDR_convert__int_rep__Request__io_service_get_matching_services_bin_t__matchingCnt__defined */
11629#if __MigTypeCheck
11630 if (In0UP->matchingCnt > 4096)
11631 return MIG_BAD_ARGUMENTS;
11632 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0UP->matchingCnt) ||
11633 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0UP->matchingCnt)))
11634 return MIG_BAD_ARGUMENTS;
11635#endif /* __MigTypeCheck */
11636
11637 return MACH_MSG_SUCCESS;
11638}
11639#endif /* !defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined) */
11640#endif /* __MIG_check__Request__iokit_subsystem__ */
11641#endif /* ( __MigTypeCheck ) */
11642
11643
11644/* Routine io_service_get_matching_services_bin */
11645mig_internal novalue _Xio_service_get_matching_services_bin
11646 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
11647 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11648 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
11649{
11650
11651#ifdef __MigPackStructs
11652#pragma pack(push, 4)
11653#endif
11654 typedef struct {
11655 NDR_record_t NDR;
11656 mach_msg_type_number_t matchingCnt;
11657 char matching[4096];
11658 mach_msg_trailer_t trailer;
11659 char padding[0]; /* Avoid generating empty UData structs */
11660 } RequestU __attribute__((unused));
11661#ifdef __MigPackStructs
11662#pragma pack(pop)
11663#endif
11664 typedef __RequestKData__io_service_get_matching_services_bin_t RequestK;
11665 typedef __RequestUData__io_service_get_matching_services_bin_t __RequestU;
11666 typedef __ReplyKData__io_service_get_matching_services_bin_t ReplyK __attribute__((unused));
11667 typedef __ReplyUData__io_service_get_matching_services_bin_t ReplyU __attribute__((unused));
11668 typedef __Reply__io_service_get_matching_services_bin_t Reply __attribute__((unused));
11669 typedef __Request__io_service_get_matching_services_bin_t __Request __attribute__((unused));
11670
11671 /*
11672 * typedef struct {
11673 * mach_msg_header_t Head;
11674 * NDR_record_t NDR;
11675 * kern_return_t RetCode;
11676 * } mig_reply_error_t;
11677 */
11678
11679 RequestK *InKP = (RequestK *) InHeadP;
11680 RequestU *In0UP = (RequestU *) InDataP;
11681 ReplyK *OutKP = (ReplyK *) OutHeadP;
11682 ReplyU *OutUP = (ReplyU *) OutDataP;
11683 (void)OutUP;
11684#ifdef __MIG_check__Request__io_service_get_matching_services_bin_t__defined
11685 kern_return_t check_result;
11686#endif /* __MIG_check__Request__io_service_get_matching_services_bin_t__defined */
11687
11688#if __MigKernelSpecificCode
11689#if UseStaticTemplates
11690 const static mach_msg_port_descriptor_t existingTemplate = {
11691 /* name = */ MACH_PORT_NULL,
11692 /* pad1 = */ 0,
11693 /* pad2 = */ 0,
11694 /* disp = */ 17,
11695 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
11696 };
11697#endif /* UseStaticTemplates */
11698
11699#else
11700#if UseStaticTemplates
11701 const static mach_msg_port_descriptor_t existingTemplate = {
11702 /* name = */ MACH_PORT_NULL,
11703 /* pad1 = */ 0,
11704 /* pad2 = */ 0,
11705 /* disp = */ 19,
11706 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
11707 };
11708#endif /* UseStaticTemplates */
11709
11710#endif /* __MigKernelSpecificCode */
11711 kern_return_t RetCode;
11712 io_object_t existing;
11713
11714 __DeclareRcvRpc(2881, "io_service_get_matching_services_bin")
11715 __BeforeRcvRpc(2881, "io_service_get_matching_services_bin")
11716
11717#if defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined)
11718 check_result = __MIG_check__Request__io_service_get_matching_services_bin_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
11719 if (check_result != MACH_MSG_SUCCESS)
11720 { MIG_RETURN_ERROR(OutKP, check_result); }
11721#endif /* defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined) */
11722
11723#if UseStaticTemplates
11724 OutKP->existing = existingTemplate;
11725#else /* UseStaticTemplates */
11726#if __MigKernelSpecificCode
11727 OutKP->existing.disposition = 17;
11728#else
11729 OutKP->existing.disposition = 19;
11730#endif /* __MigKernelSpecificCode */
11731#if !(defined(KERNEL) && defined(__LP64__))
11732 OutKP->existing.pad1 = 0;
11733#endif
11734 OutKP->existing.pad2 = 0;
11735 OutKP->existing.type = MACH_MSG_PORT_DESCRIPTOR;
11736#if defined(KERNEL)
11737 OutKP->existing.pad_end = 0;
11738#endif
11739#endif /* UseStaticTemplates */
11740
11741
11742 RetCode = is_io_service_get_matching_services_bin(main_port: InKP->Head.msgh_request_port, matching: In0UP->matching, matchingCnt: In0UP->matchingCnt, existing: &existing);
11743 if (RetCode != KERN_SUCCESS) {
11744 MIG_RETURN_ERROR(OutKP, RetCode);
11745 }
11746#if __MigKernelSpecificCode
11747#endif /* __MigKernelSpecificCode */
11748 OutKP->existing.name = (mach_port_t)iokit_make_object_port(obj: existing);
11749
11750
11751 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
11752 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
11753 OutKP->msgh_body.msgh_descriptor_count = 1;
11754 __AfterRcvRpc(2881, "io_service_get_matching_services_bin")
11755}
11756
11757#if ( __MigTypeCheck )
11758#if __MIG_check__Request__iokit_subsystem__
11759#if !defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined)
11760#define __MIG_check__Request__io_service_match_property_table_bin_t__defined
11761
11762mig_internal kern_return_t __MIG_check__Request__io_service_match_property_table_bin_t(
11763 __attribute__((__unused__)) __RequestKData__io_service_match_property_table_bin_t *InKP,
11764 __attribute__((__unused__)) __RequestUData__io_service_match_property_table_bin_t *In0UP,
11765 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
11766{
11767
11768 typedef __Request__io_service_match_property_table_bin_t __Request;
11769 typedef __RequestUData__io_service_match_property_table_bin_t __RequestU __attribute__((unused));
11770#if __MigTypeCheck
11771 unsigned int msgh_size;
11772#endif /* __MigTypeCheck */
11773
11774#if __MigTypeCheck
11775 msgh_size = InKP->Head.msgh_size;
11776 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
11777 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
11778 return MIG_BAD_ARGUMENTS;
11779#endif /* __MigTypeCheck */
11780
11781#if defined(__NDR_convert__int_rep__Request__io_service_match_property_table_bin_t__matchingCnt__defined)
11782 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11783 __NDR_convert__int_rep__Request__io_service_match_property_table_bin_t__matchingCnt(&In0UP->matchingCnt, In0UP->NDR.int_rep);
11784#endif /* __NDR_convert__int_rep__Request__io_service_match_property_table_bin_t__matchingCnt__defined */
11785#if __MigTypeCheck
11786 if (In0UP->matchingCnt > 4096)
11787 return MIG_BAD_ARGUMENTS;
11788 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0UP->matchingCnt) ||
11789 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0UP->matchingCnt)))
11790 return MIG_BAD_ARGUMENTS;
11791#endif /* __MigTypeCheck */
11792
11793 return MACH_MSG_SUCCESS;
11794}
11795#endif /* !defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined) */
11796#endif /* __MIG_check__Request__iokit_subsystem__ */
11797#endif /* ( __MigTypeCheck ) */
11798
11799
11800/* Routine io_service_match_property_table_bin */
11801mig_internal novalue _Xio_service_match_property_table_bin
11802 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
11803 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11804 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
11805{
11806
11807#ifdef __MigPackStructs
11808#pragma pack(push, 4)
11809#endif
11810 typedef struct {
11811 NDR_record_t NDR;
11812 mach_msg_type_number_t matchingCnt;
11813 char matching[4096];
11814 mach_msg_trailer_t trailer;
11815 char padding[0]; /* Avoid generating empty UData structs */
11816 } RequestU __attribute__((unused));
11817#ifdef __MigPackStructs
11818#pragma pack(pop)
11819#endif
11820 typedef __RequestKData__io_service_match_property_table_bin_t RequestK;
11821 typedef __RequestUData__io_service_match_property_table_bin_t __RequestU;
11822 typedef __ReplyKData__io_service_match_property_table_bin_t ReplyK __attribute__((unused));
11823 typedef __ReplyUData__io_service_match_property_table_bin_t ReplyU __attribute__((unused));
11824 typedef __Reply__io_service_match_property_table_bin_t Reply __attribute__((unused));
11825 typedef __Request__io_service_match_property_table_bin_t __Request __attribute__((unused));
11826
11827 /*
11828 * typedef struct {
11829 * mach_msg_header_t Head;
11830 * NDR_record_t NDR;
11831 * kern_return_t RetCode;
11832 * } mig_reply_error_t;
11833 */
11834
11835 RequestK *InKP = (RequestK *) InHeadP;
11836 RequestU *In0UP = (RequestU *) InDataP;
11837 ReplyK *OutKP = (ReplyK *) OutHeadP;
11838 ReplyU *OutUP = (ReplyU *) OutDataP;
11839 (void)OutUP;
11840#ifdef __MIG_check__Request__io_service_match_property_table_bin_t__defined
11841 kern_return_t check_result;
11842#endif /* __MIG_check__Request__io_service_match_property_table_bin_t__defined */
11843
11844#if __MigKernelSpecificCode
11845#else
11846#endif /* __MigKernelSpecificCode */
11847 io_object_t service;
11848
11849 __DeclareRcvRpc(2882, "io_service_match_property_table_bin")
11850 __BeforeRcvRpc(2882, "io_service_match_property_table_bin")
11851
11852#if defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined)
11853 check_result = __MIG_check__Request__io_service_match_property_table_bin_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
11854 if (check_result != MACH_MSG_SUCCESS)
11855 { MIG_RETURN_ERROR(OutKP, check_result); }
11856#endif /* defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined) */
11857
11858 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
11859
11860 OutUP->RetCode = is_io_service_match_property_table_bin(service, matching: In0UP->matching, matchingCnt: In0UP->matchingCnt, matches: &OutUP->matches);
11861 iokit_remove_reference(obj: service);
11862 if (OutUP->RetCode != KERN_SUCCESS) {
11863 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
11864 }
11865#if __MigKernelSpecificCode
11866#endif /* __MigKernelSpecificCode */
11867
11868 OutUP->NDR = NDR_record;
11869
11870
11871 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
11872 __AfterRcvRpc(2882, "io_service_match_property_table_bin")
11873}
11874
11875#if ( __MigTypeCheck )
11876#if __MIG_check__Request__iokit_subsystem__
11877#if !defined(__MIG_check__Request__io_service_add_notification_bin_t__defined)
11878#define __MIG_check__Request__io_service_add_notification_bin_t__defined
11879
11880mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_bin_t(
11881 __attribute__((__unused__)) __RequestKData__io_service_add_notification_bin_t *InKP,
11882 __attribute__((__unused__)) __RequestUData__io_service_add_notification_bin_t *In0UP,
11883 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11884 __attribute__((__unused__)) __RequestUData__io_service_add_notification_bin_t **In1UPP,
11885 __attribute__((__unused__)) __RequestUData__io_service_add_notification_bin_t **In2UPP)
11886{
11887
11888 typedef __Request__io_service_add_notification_bin_t __Request;
11889 typedef __RequestUData__io_service_add_notification_bin_t __RequestU __attribute__((unused));
11890 __RequestU *In1UP;
11891 __RequestU *In2UP;
11892#if __MigTypeCheck
11893 unsigned int msgh_size;
11894#endif /* __MigTypeCheck */
11895 unsigned int msgh_size_delta;
11896
11897#if __MigTypeCheck
11898 msgh_size = InKP->Head.msgh_size;
11899 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
11900 (InKP->msgh_body.msgh_descriptor_count != 1) ||
11901 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4256)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
11902 return MIG_BAD_ARGUMENTS;
11903#endif /* __MigTypeCheck */
11904
11905#if __MigTypeCheck
11906 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
11907 InKP->wake_port.disposition != 17)
11908 return MIG_TYPE_ERROR;
11909#endif /* __MigTypeCheck */
11910
11911#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__notification_typeCnt__defined)
11912 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11913 __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__notification_typeCnt(&In0UP->notification_typeCnt, In0UP->NDR.int_rep);
11914#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__notification_typeCnt__defined */
11915 msgh_size_delta = _WALIGN_(In0UP->notification_typeCnt);
11916#if __MigTypeCheck
11917 if (In0UP->notification_typeCnt > 128)
11918 return MIG_BAD_ARGUMENTS;
11919 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4256)) < In0UP->notification_typeCnt) ||
11920 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4256) + _WALIGN_(In0UP->notification_typeCnt)))
11921 return MIG_BAD_ARGUMENTS;
11922 msgh_size -= msgh_size_delta;
11923#endif /* __MigTypeCheck */
11924
11925 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
11926
11927#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__matchingCnt__defined)
11928 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11929 __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__matchingCnt(&In1UP->matchingCnt, In1UP->NDR.int_rep);
11930#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__matchingCnt__defined */
11931 msgh_size_delta = _WALIGN_(In1UP->matchingCnt);
11932#if __MigTypeCheck
11933 if (In1UP->matchingCnt > 4096)
11934 return MIG_BAD_ARGUMENTS;
11935 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4256)) < In1UP->matchingCnt) ||
11936 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4256) + _WALIGN_(In1UP->matchingCnt)))
11937 return MIG_BAD_ARGUMENTS;
11938 msgh_size -= msgh_size_delta;
11939#endif /* __MigTypeCheck */
11940
11941 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 4096);
11942
11943#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__referenceCnt__defined)
11944 if (In0UP->NDR.int_rep != NDR_record.int_rep)
11945 __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__referenceCnt(&In2UP->referenceCnt, In2UP->NDR.int_rep);
11946#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__referenceCnt__defined */
11947#if __MigTypeCheck
11948 if (In2UP->referenceCnt > 8)
11949 return MIG_BAD_ARGUMENTS;
11950 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4256)) / 4 < In2UP->referenceCnt) ||
11951 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4256) + (4 * In2UP->referenceCnt)))
11952 return MIG_BAD_ARGUMENTS;
11953#endif /* __MigTypeCheck */
11954
11955#if __MigTypeCheck
11956 {
11957 char * msg_limit = (char *) InTrailerP;
11958#if __MigKernelSpecificCode
11959 size_t strnlen_limit;
11960#else
11961 size_t memchr_limit;
11962#endif /* __MigKernelSpecificCode */
11963
11964#if __MigKernelSpecificCode
11965 strnlen_limit = min((msg_limit - In0UP->notification_type), 128);
11966 if (( strnlen(s: In0UP->notification_type, n: strnlen_limit) >= 128 + 1 ))
11967 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
11968#else
11969 memchr_limit = min((msg_limit - In0UP->notification_type), 128);
11970 if (( memchr(In0UP->notification_type, '\0', memchr_limit) == NULL ))
11971 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
11972#endif /* __MigKernelSpecificCode */
11973 }
11974#endif /* __MigTypeCheck */
11975
11976 return MACH_MSG_SUCCESS;
11977}
11978#endif /* !defined(__MIG_check__Request__io_service_add_notification_bin_t__defined) */
11979#endif /* __MIG_check__Request__iokit_subsystem__ */
11980#endif /* ( __MigTypeCheck ) */
11981
11982
11983/* Routine io_service_add_notification_bin */
11984mig_internal novalue _Xio_service_add_notification_bin
11985 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
11986 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
11987 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
11988{
11989
11990#ifdef __MigPackStructs
11991#pragma pack(push, 4)
11992#endif
11993 typedef struct {
11994 NDR_record_t NDR;
11995 mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
11996 mach_msg_type_number_t notification_typeCnt;
11997 char notification_type[128];
11998 mach_msg_type_number_t matchingCnt;
11999 char matching[4096];
12000 mach_msg_type_number_t referenceCnt;
12001 natural_t reference[8];
12002 mach_msg_trailer_t trailer;
12003 char padding[0]; /* Avoid generating empty UData structs */
12004 } RequestU __attribute__((unused));
12005#ifdef __MigPackStructs
12006#pragma pack(pop)
12007#endif
12008 typedef __RequestKData__io_service_add_notification_bin_t RequestK;
12009 typedef __RequestUData__io_service_add_notification_bin_t __RequestU;
12010 typedef __ReplyKData__io_service_add_notification_bin_t ReplyK __attribute__((unused));
12011 typedef __ReplyUData__io_service_add_notification_bin_t ReplyU __attribute__((unused));
12012 typedef __Reply__io_service_add_notification_bin_t Reply __attribute__((unused));
12013 typedef __Request__io_service_add_notification_bin_t __Request __attribute__((unused));
12014
12015 /*
12016 * typedef struct {
12017 * mach_msg_header_t Head;
12018 * NDR_record_t NDR;
12019 * kern_return_t RetCode;
12020 * } mig_reply_error_t;
12021 */
12022
12023 RequestK *InKP = (RequestK *) InHeadP;
12024 RequestU *In0UP = (RequestU *) InDataP;
12025 RequestU *In1UP;
12026 RequestU *In2UP;
12027 ReplyK *OutKP = (ReplyK *) OutHeadP;
12028 ReplyU *OutUP = (ReplyU *) OutDataP;
12029 (void)OutUP;
12030#ifdef __MIG_check__Request__io_service_add_notification_bin_t__defined
12031 kern_return_t check_result;
12032#endif /* __MIG_check__Request__io_service_add_notification_bin_t__defined */
12033
12034#if __MigKernelSpecificCode
12035#if UseStaticTemplates
12036 const static mach_msg_port_descriptor_t notificationTemplate = {
12037 /* name = */ MACH_PORT_NULL,
12038 /* pad1 = */ 0,
12039 /* pad2 = */ 0,
12040 /* disp = */ 17,
12041 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
12042 };
12043#endif /* UseStaticTemplates */
12044
12045#else
12046#if UseStaticTemplates
12047 const static mach_msg_port_descriptor_t notificationTemplate = {
12048 /* name = */ MACH_PORT_NULL,
12049 /* pad1 = */ 0,
12050 /* pad2 = */ 0,
12051 /* disp = */ 19,
12052 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
12053 };
12054#endif /* UseStaticTemplates */
12055
12056#endif /* __MigKernelSpecificCode */
12057 kern_return_t RetCode;
12058 io_object_t notification;
12059
12060 __DeclareRcvRpc(2883, "io_service_add_notification_bin")
12061 __BeforeRcvRpc(2883, "io_service_add_notification_bin")
12062
12063#if defined(__MIG_check__Request__io_service_add_notification_bin_t__defined)
12064 check_result = __MIG_check__Request__io_service_add_notification_bin_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
12065 if (check_result != MACH_MSG_SUCCESS)
12066 { MIG_RETURN_ERROR(OutKP, check_result); }
12067#endif /* defined(__MIG_check__Request__io_service_add_notification_bin_t__defined) */
12068
12069#if UseStaticTemplates
12070 OutKP->notification = notificationTemplate;
12071#else /* UseStaticTemplates */
12072#if __MigKernelSpecificCode
12073 OutKP->notification.disposition = 17;
12074#else
12075 OutKP->notification.disposition = 19;
12076#endif /* __MigKernelSpecificCode */
12077#if !(defined(KERNEL) && defined(__LP64__))
12078 OutKP->notification.pad1 = 0;
12079#endif
12080 OutKP->notification.pad2 = 0;
12081 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
12082#if defined(KERNEL)
12083 OutKP->notification.pad_end = 0;
12084#endif
12085#endif /* UseStaticTemplates */
12086
12087
12088 RetCode = is_io_service_add_notification_bin(main_port: InKP->Head.msgh_request_port, notification_type: In0UP->notification_type, matching: In1UP->matching, matchingCnt: In1UP->matchingCnt, wake_port: InKP->wake_port.name, reference: In2UP->reference, referenceCnt: In2UP->referenceCnt, notification: &notification);
12089 if (RetCode != KERN_SUCCESS) {
12090 MIG_RETURN_ERROR(OutKP, RetCode);
12091 }
12092#if __MigKernelSpecificCode
12093#endif /* __MigKernelSpecificCode */
12094 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
12095
12096
12097 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
12098 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
12099 OutKP->msgh_body.msgh_descriptor_count = 1;
12100 __AfterRcvRpc(2883, "io_service_add_notification_bin")
12101}
12102
12103#if ( __MigTypeCheck )
12104#if __MIG_check__Request__iokit_subsystem__
12105#if !defined(__MIG_check__Request__io_service_add_notification_bin_64_t__defined)
12106#define __MIG_check__Request__io_service_add_notification_bin_64_t__defined
12107
12108mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_bin_64_t(
12109 __attribute__((__unused__)) __RequestKData__io_service_add_notification_bin_64_t *InKP,
12110 __attribute__((__unused__)) __RequestUData__io_service_add_notification_bin_64_t *In0UP,
12111 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
12112 __attribute__((__unused__)) __RequestUData__io_service_add_notification_bin_64_t **In1UPP,
12113 __attribute__((__unused__)) __RequestUData__io_service_add_notification_bin_64_t **In2UPP)
12114{
12115
12116 typedef __Request__io_service_add_notification_bin_64_t __Request;
12117 typedef __RequestUData__io_service_add_notification_bin_64_t __RequestU __attribute__((unused));
12118 __RequestU *In1UP;
12119 __RequestU *In2UP;
12120#if __MigTypeCheck
12121 unsigned int msgh_size;
12122#endif /* __MigTypeCheck */
12123 unsigned int msgh_size_delta;
12124
12125#if __MigTypeCheck
12126 msgh_size = InKP->Head.msgh_size;
12127 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
12128 (InKP->msgh_body.msgh_descriptor_count != 1) ||
12129 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
12130 return MIG_BAD_ARGUMENTS;
12131#endif /* __MigTypeCheck */
12132
12133#if __MigTypeCheck
12134 if (InKP->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
12135 InKP->wake_port.disposition != 17)
12136 return MIG_TYPE_ERROR;
12137#endif /* __MigTypeCheck */
12138
12139#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__notification_typeCnt__defined)
12140 if (In0UP->NDR.int_rep != NDR_record.int_rep)
12141 __NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__notification_typeCnt(&In0UP->notification_typeCnt, In0UP->NDR.int_rep);
12142#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__notification_typeCnt__defined */
12143 msgh_size_delta = _WALIGN_(In0UP->notification_typeCnt);
12144#if __MigTypeCheck
12145 if (In0UP->notification_typeCnt > 128)
12146 return MIG_BAD_ARGUMENTS;
12147 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) < In0UP->notification_typeCnt) ||
12148 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + _WALIGN_(In0UP->notification_typeCnt)))
12149 return MIG_BAD_ARGUMENTS;
12150 msgh_size -= msgh_size_delta;
12151#endif /* __MigTypeCheck */
12152
12153 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
12154
12155#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__matchingCnt__defined)
12156 if (In0UP->NDR.int_rep != NDR_record.int_rep)
12157 __NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__matchingCnt(&In1UP->matchingCnt, In1UP->NDR.int_rep);
12158#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__matchingCnt__defined */
12159 msgh_size_delta = _WALIGN_(In1UP->matchingCnt);
12160#if __MigTypeCheck
12161 if (In1UP->matchingCnt > 4096)
12162 return MIG_BAD_ARGUMENTS;
12163 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) < In1UP->matchingCnt) ||
12164 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + _WALIGN_(In1UP->matchingCnt)))
12165 return MIG_BAD_ARGUMENTS;
12166 msgh_size -= msgh_size_delta;
12167#endif /* __MigTypeCheck */
12168
12169 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 4096);
12170
12171#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__referenceCnt__defined)
12172 if (In0UP->NDR.int_rep != NDR_record.int_rep)
12173 __NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__referenceCnt(&In2UP->referenceCnt, In2UP->NDR.int_rep);
12174#endif /* __NDR_convert__int_rep__Request__io_service_add_notification_bin_64_t__referenceCnt__defined */
12175#if __MigTypeCheck
12176 if (In2UP->referenceCnt > 8)
12177 return MIG_BAD_ARGUMENTS;
12178 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) / 8 < In2UP->referenceCnt) ||
12179 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4288) + (8 * In2UP->referenceCnt)))
12180 return MIG_BAD_ARGUMENTS;
12181#endif /* __MigTypeCheck */
12182
12183#if __MigTypeCheck
12184 {
12185 char * msg_limit = (char *) InTrailerP;
12186#if __MigKernelSpecificCode
12187 size_t strnlen_limit;
12188#else
12189 size_t memchr_limit;
12190#endif /* __MigKernelSpecificCode */
12191
12192#if __MigKernelSpecificCode
12193 strnlen_limit = min((msg_limit - In0UP->notification_type), 128);
12194 if (( strnlen(s: In0UP->notification_type, n: strnlen_limit) >= 128 + 1 ))
12195 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12196#else
12197 memchr_limit = min((msg_limit - In0UP->notification_type), 128);
12198 if (( memchr(In0UP->notification_type, '\0', memchr_limit) == NULL ))
12199 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12200#endif /* __MigKernelSpecificCode */
12201 }
12202#endif /* __MigTypeCheck */
12203
12204 return MACH_MSG_SUCCESS;
12205}
12206#endif /* !defined(__MIG_check__Request__io_service_add_notification_bin_64_t__defined) */
12207#endif /* __MIG_check__Request__iokit_subsystem__ */
12208#endif /* ( __MigTypeCheck ) */
12209
12210
12211/* Routine io_service_add_notification_bin_64 */
12212mig_internal novalue _Xio_service_add_notification_bin_64
12213 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
12214 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
12215 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
12216{
12217
12218#ifdef __MigPackStructs
12219#pragma pack(push, 4)
12220#endif
12221 typedef struct {
12222 NDR_record_t NDR;
12223 mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
12224 mach_msg_type_number_t notification_typeCnt;
12225 char notification_type[128];
12226 mach_msg_type_number_t matchingCnt;
12227 char matching[4096];
12228 mach_msg_type_number_t referenceCnt;
12229 io_user_reference_t reference[8];
12230 mach_msg_trailer_t trailer;
12231 char padding[0]; /* Avoid generating empty UData structs */
12232 } RequestU __attribute__((unused));
12233#ifdef __MigPackStructs
12234#pragma pack(pop)
12235#endif
12236 typedef __RequestKData__io_service_add_notification_bin_64_t RequestK;
12237 typedef __RequestUData__io_service_add_notification_bin_64_t __RequestU;
12238 typedef __ReplyKData__io_service_add_notification_bin_64_t ReplyK __attribute__((unused));
12239 typedef __ReplyUData__io_service_add_notification_bin_64_t ReplyU __attribute__((unused));
12240 typedef __Reply__io_service_add_notification_bin_64_t Reply __attribute__((unused));
12241 typedef __Request__io_service_add_notification_bin_64_t __Request __attribute__((unused));
12242
12243 /*
12244 * typedef struct {
12245 * mach_msg_header_t Head;
12246 * NDR_record_t NDR;
12247 * kern_return_t RetCode;
12248 * } mig_reply_error_t;
12249 */
12250
12251 RequestK *InKP = (RequestK *) InHeadP;
12252 RequestU *In0UP = (RequestU *) InDataP;
12253 RequestU *In1UP;
12254 RequestU *In2UP;
12255 ReplyK *OutKP = (ReplyK *) OutHeadP;
12256 ReplyU *OutUP = (ReplyU *) OutDataP;
12257 (void)OutUP;
12258#ifdef __MIG_check__Request__io_service_add_notification_bin_64_t__defined
12259 kern_return_t check_result;
12260#endif /* __MIG_check__Request__io_service_add_notification_bin_64_t__defined */
12261
12262#if __MigKernelSpecificCode
12263#if UseStaticTemplates
12264 const static mach_msg_port_descriptor_t notificationTemplate = {
12265 /* name = */ MACH_PORT_NULL,
12266 /* pad1 = */ 0,
12267 /* pad2 = */ 0,
12268 /* disp = */ 17,
12269 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
12270 };
12271#endif /* UseStaticTemplates */
12272
12273#else
12274#if UseStaticTemplates
12275 const static mach_msg_port_descriptor_t notificationTemplate = {
12276 /* name = */ MACH_PORT_NULL,
12277 /* pad1 = */ 0,
12278 /* pad2 = */ 0,
12279 /* disp = */ 19,
12280 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
12281 };
12282#endif /* UseStaticTemplates */
12283
12284#endif /* __MigKernelSpecificCode */
12285 kern_return_t RetCode;
12286 io_object_t notification;
12287
12288 __DeclareRcvRpc(2884, "io_service_add_notification_bin_64")
12289 __BeforeRcvRpc(2884, "io_service_add_notification_bin_64")
12290
12291#if defined(__MIG_check__Request__io_service_add_notification_bin_64_t__defined)
12292 check_result = __MIG_check__Request__io_service_add_notification_bin_64_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
12293 if (check_result != MACH_MSG_SUCCESS)
12294 { MIG_RETURN_ERROR(OutKP, check_result); }
12295#endif /* defined(__MIG_check__Request__io_service_add_notification_bin_64_t__defined) */
12296
12297#if UseStaticTemplates
12298 OutKP->notification = notificationTemplate;
12299#else /* UseStaticTemplates */
12300#if __MigKernelSpecificCode
12301 OutKP->notification.disposition = 17;
12302#else
12303 OutKP->notification.disposition = 19;
12304#endif /* __MigKernelSpecificCode */
12305#if !(defined(KERNEL) && defined(__LP64__))
12306 OutKP->notification.pad1 = 0;
12307#endif
12308 OutKP->notification.pad2 = 0;
12309 OutKP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
12310#if defined(KERNEL)
12311 OutKP->notification.pad_end = 0;
12312#endif
12313#endif /* UseStaticTemplates */
12314
12315
12316 RetCode = is_io_service_add_notification_bin_64(main_port: InKP->Head.msgh_request_port, notification_type: In0UP->notification_type, matching: In1UP->matching, matchingCnt: In1UP->matchingCnt, wake_port: InKP->wake_port.name, reference: In2UP->reference, referenceCnt: In2UP->referenceCnt, notification: &notification);
12317 if (RetCode != KERN_SUCCESS) {
12318 MIG_RETURN_ERROR(OutKP, RetCode);
12319 }
12320#if __MigKernelSpecificCode
12321#endif /* __MigKernelSpecificCode */
12322 OutKP->notification.name = (mach_port_t)iokit_make_object_port(obj: notification);
12323
12324
12325 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
12326 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
12327 OutKP->msgh_body.msgh_descriptor_count = 1;
12328 __AfterRcvRpc(2884, "io_service_add_notification_bin_64")
12329}
12330
12331#if ( __MigTypeCheck )
12332#if __MIG_check__Request__iokit_subsystem__
12333#if !defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined)
12334#define __MIG_check__Request__io_registry_entry_get_path_ool_t__defined
12335
12336mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_path_ool_t(
12337 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_path_ool_t *InKP,
12338 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_path_ool_t *In0UP,
12339 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
12340{
12341
12342 typedef __Request__io_registry_entry_get_path_ool_t __Request;
12343 typedef __RequestUData__io_registry_entry_get_path_ool_t __RequestU __attribute__((unused));
12344#if __MigTypeCheck
12345 unsigned int msgh_size;
12346#endif /* __MigTypeCheck */
12347
12348#if __MigTypeCheck
12349 msgh_size = InKP->Head.msgh_size;
12350 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
12351 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
12352 return MIG_BAD_ARGUMENTS;
12353#endif /* __MigTypeCheck */
12354
12355#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_path_ool_t__planeCnt__defined)
12356 if (In0UP->NDR.int_rep != NDR_record.int_rep)
12357 __NDR_convert__int_rep__Request__io_registry_entry_get_path_ool_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
12358#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_path_ool_t__planeCnt__defined */
12359#if __MigTypeCheck
12360 if (In0UP->planeCnt > 128)
12361 return MIG_BAD_ARGUMENTS;
12362 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->planeCnt) ||
12363 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->planeCnt)))
12364 return MIG_BAD_ARGUMENTS;
12365#endif /* __MigTypeCheck */
12366
12367#if __MigTypeCheck
12368 {
12369 char * msg_limit = (char *) InTrailerP;
12370#if __MigKernelSpecificCode
12371 size_t strnlen_limit;
12372#else
12373 size_t memchr_limit;
12374#endif /* __MigKernelSpecificCode */
12375
12376#if __MigKernelSpecificCode
12377 strnlen_limit = min((msg_limit - In0UP->plane), 128);
12378 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
12379 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12380#else
12381 memchr_limit = min((msg_limit - In0UP->plane), 128);
12382 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
12383 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12384#endif /* __MigKernelSpecificCode */
12385 }
12386#endif /* __MigTypeCheck */
12387
12388 return MACH_MSG_SUCCESS;
12389}
12390#endif /* !defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined) */
12391#endif /* __MIG_check__Request__iokit_subsystem__ */
12392#endif /* ( __MigTypeCheck ) */
12393
12394
12395/* Routine io_registry_entry_get_path_ool */
12396mig_internal novalue _Xio_registry_entry_get_path_ool
12397 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
12398 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
12399 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
12400{
12401
12402#ifdef __MigPackStructs
12403#pragma pack(push, 4)
12404#endif
12405 typedef struct {
12406 NDR_record_t NDR;
12407 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
12408 mach_msg_type_number_t planeCnt;
12409 char plane[128];
12410 mach_msg_trailer_t trailer;
12411 char padding[0]; /* Avoid generating empty UData structs */
12412 } RequestU __attribute__((unused));
12413#ifdef __MigPackStructs
12414#pragma pack(pop)
12415#endif
12416 typedef __RequestKData__io_registry_entry_get_path_ool_t RequestK;
12417 typedef __RequestUData__io_registry_entry_get_path_ool_t __RequestU;
12418 typedef __ReplyKData__io_registry_entry_get_path_ool_t ReplyK __attribute__((unused));
12419 typedef __ReplyUData__io_registry_entry_get_path_ool_t ReplyU __attribute__((unused));
12420 typedef __Reply__io_registry_entry_get_path_ool_t Reply __attribute__((unused));
12421 typedef __Request__io_registry_entry_get_path_ool_t __Request __attribute__((unused));
12422
12423 /*
12424 * typedef struct {
12425 * mach_msg_header_t Head;
12426 * NDR_record_t NDR;
12427 * kern_return_t RetCode;
12428 * } mig_reply_error_t;
12429 */
12430
12431 RequestK *InKP = (RequestK *) InHeadP;
12432 RequestU *In0UP = (RequestU *) InDataP;
12433 ReplyK *OutKP = (ReplyK *) OutHeadP;
12434 ReplyU *OutUP = (ReplyU *) OutDataP;
12435 (void)OutUP;
12436 unsigned int msgh_size_delta;
12437
12438#ifdef __MIG_check__Request__io_registry_entry_get_path_ool_t__defined
12439 kern_return_t check_result;
12440#endif /* __MIG_check__Request__io_registry_entry_get_path_ool_t__defined */
12441
12442#if __MigKernelSpecificCode
12443#if UseStaticTemplates
12444 const static mach_msg_ool_descriptor_t path_oolTemplate = {
12445 /* addr = */ (void *)0,
12446 /* size = */ 0,
12447 /* deal = */ FALSE,
12448 /* copy = */ MACH_MSG_PHYSICAL_COPY,
12449 /* pad2 = */ 0,
12450 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
12451 };
12452#endif /* UseStaticTemplates */
12453
12454#else
12455#if UseStaticTemplates
12456 const static mach_msg_ool_descriptor_t path_oolTemplate = {
12457 /* addr = */ (void *)0,
12458 /* size = */ 0,
12459 /* deal = */ FALSE,
12460 /* copy = */ MACH_MSG_PHYSICAL_COPY,
12461 /* pad2 = */ 0,
12462 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
12463 };
12464#endif /* UseStaticTemplates */
12465
12466#endif /* __MigKernelSpecificCode */
12467 kern_return_t RetCode;
12468 io_object_t registry_entry;
12469 mach_msg_type_number_t path_oolCnt;
12470
12471 __DeclareRcvRpc(2885, "io_registry_entry_get_path_ool")
12472 __BeforeRcvRpc(2885, "io_registry_entry_get_path_ool")
12473
12474#if defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined)
12475 check_result = __MIG_check__Request__io_registry_entry_get_path_ool_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
12476 if (check_result != MACH_MSG_SUCCESS)
12477 { MIG_RETURN_ERROR(OutKP, check_result); }
12478#endif /* defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined) */
12479
12480#if UseStaticTemplates
12481 OutKP->path_ool = path_oolTemplate;
12482#else /* UseStaticTemplates */
12483 OutKP->path_ool.deallocate = FALSE;
12484 OutKP->path_ool.copy = MACH_MSG_PHYSICAL_COPY;
12485 OutKP->path_ool.pad1 = 0;
12486 OutKP->path_ool.type = MACH_MSG_OOL_DESCRIPTOR;
12487#if defined(KERNEL) && !defined(__LP64__)
12488 OutKP->path_ool.pad_end = 0;
12489#endif
12490#endif /* UseStaticTemplates */
12491
12492
12493 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
12494
12495 RetCode = is_io_registry_entry_get_path_ool(registry_entry, plane: In0UP->plane, path: OutUP->path, path_ool: (io_buf_ptr_t *)&(OutKP->path_ool.address), path_oolCnt: &path_oolCnt);
12496 iokit_remove_reference(obj: registry_entry);
12497 if (RetCode != KERN_SUCCESS) {
12498 MIG_RETURN_ERROR(OutKP, RetCode);
12499 }
12500#if __MigKernelSpecificCode
12501#endif /* __MigKernelSpecificCode */
12502 OutKP->path_ool.size = path_oolCnt;
12503
12504
12505 OutUP->NDR = NDR_record;
12506
12507#ifdef __LP64__
12508 {
12509 size_t strLength = strlen(s: OutUP->path) + 1;
12510 if (strLength > 0xffffffff)
12511 MIG_RETURN_ERROR(OutKP, MIG_BAD_ARGUMENTS);
12512 OutUP->pathCnt = (mach_msg_type_number_t) strLength;
12513 }
12514#else
12515 OutUP->pathCnt = (mach_msg_type_number_t) strlen(OutUP->path) + 1;
12516#endif /* __LP64__ */
12517 msgh_size_delta = _WALIGN_((OutUP->pathCnt + 3) & ~3);
12518 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + msgh_size_delta;
12519 OutUP = (ReplyU *) ((pointer_t) OutUP + msgh_size_delta - 4096);
12520 OutUP->path_oolCnt = path_oolCnt;
12521
12522 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
12523 OutKP->msgh_body.msgh_descriptor_count = 1;
12524 __AfterRcvRpc(2885, "io_registry_entry_get_path_ool")
12525}
12526
12527#if ( __MigTypeCheck )
12528#if __MIG_check__Request__iokit_subsystem__
12529#if !defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined)
12530#define __MIG_check__Request__io_registry_entry_from_path_ool_t__defined
12531
12532mig_internal kern_return_t __MIG_check__Request__io_registry_entry_from_path_ool_t(
12533 __attribute__((__unused__)) __RequestKData__io_registry_entry_from_path_ool_t *InKP,
12534 __attribute__((__unused__)) __RequestUData__io_registry_entry_from_path_ool_t *In0UP,
12535 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
12536 __attribute__((__unused__)) __RequestUData__io_registry_entry_from_path_ool_t **In1UPP)
12537{
12538
12539 typedef __Request__io_registry_entry_from_path_ool_t __Request;
12540 typedef __RequestUData__io_registry_entry_from_path_ool_t __RequestU __attribute__((unused));
12541 __RequestU *In1UP;
12542#if __MigTypeCheck
12543 unsigned int msgh_size;
12544#endif /* __MigTypeCheck */
12545 unsigned int msgh_size_delta;
12546
12547#if __MigTypeCheck
12548 msgh_size = InKP->Head.msgh_size;
12549 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
12550 (InKP->msgh_body.msgh_descriptor_count != 1) ||
12551 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
12552 return MIG_BAD_ARGUMENTS;
12553#endif /* __MigTypeCheck */
12554
12555#if __MigTypeCheck
12556 if (InKP->path_ool.type != MACH_MSG_OOL_DESCRIPTOR)
12557 return MIG_TYPE_ERROR;
12558#endif /* __MigTypeCheck */
12559
12560#if defined(__NDR_convert__int_rep__Request__io_registry_entry_from_path_ool_t__pathCnt__defined)
12561 if (In0UP->NDR.int_rep != NDR_record.int_rep)
12562 __NDR_convert__int_rep__Request__io_registry_entry_from_path_ool_t__pathCnt(&In0UP->pathCnt, In0UP->NDR.int_rep);
12563#endif /* __NDR_convert__int_rep__Request__io_registry_entry_from_path_ool_t__pathCnt__defined */
12564 msgh_size_delta = _WALIGN_(In0UP->pathCnt);
12565#if __MigTypeCheck
12566 if (In0UP->pathCnt > 4096)
12567 return MIG_BAD_ARGUMENTS;
12568 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0UP->pathCnt) ||
12569 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0UP->pathCnt)))
12570 return MIG_BAD_ARGUMENTS;
12571#endif /* __MigTypeCheck */
12572
12573 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 4096);
12574
12575#if __MigTypeCheck
12576 if (InKP->path_ool.size != In1UP->path_oolCnt)
12577 return MIG_TYPE_ERROR;
12578#endif /* __MigTypeCheck */
12579
12580#if __MigTypeCheck
12581 {
12582 char * msg_limit = (char *) InTrailerP;
12583#if __MigKernelSpecificCode
12584 size_t strnlen_limit;
12585#else
12586 size_t memchr_limit;
12587#endif /* __MigKernelSpecificCode */
12588
12589#if __MigKernelSpecificCode
12590 strnlen_limit = min((msg_limit - In0UP->path), 4096);
12591 if (( strnlen(s: In0UP->path, n: strnlen_limit) >= 4096 + 1 ))
12592 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12593#else
12594 memchr_limit = min((msg_limit - In0UP->path), 4096);
12595 if (( memchr(In0UP->path, '\0', memchr_limit) == NULL ))
12596 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12597#endif /* __MigKernelSpecificCode */
12598 }
12599#endif /* __MigTypeCheck */
12600
12601 return MACH_MSG_SUCCESS;
12602}
12603#endif /* !defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined) */
12604#endif /* __MIG_check__Request__iokit_subsystem__ */
12605#endif /* ( __MigTypeCheck ) */
12606
12607
12608/* Routine io_registry_entry_from_path_ool */
12609mig_internal novalue _Xio_registry_entry_from_path_ool
12610 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
12611 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
12612 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
12613{
12614
12615#ifdef __MigPackStructs
12616#pragma pack(push, 4)
12617#endif
12618 typedef struct {
12619 NDR_record_t NDR;
12620 mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
12621 mach_msg_type_number_t pathCnt;
12622 char path[4096];
12623 mach_msg_type_number_t path_oolCnt;
12624 mach_msg_trailer_t trailer;
12625 char padding[0]; /* Avoid generating empty UData structs */
12626 } RequestU __attribute__((unused));
12627#ifdef __MigPackStructs
12628#pragma pack(pop)
12629#endif
12630 typedef __RequestKData__io_registry_entry_from_path_ool_t RequestK;
12631 typedef __RequestUData__io_registry_entry_from_path_ool_t __RequestU;
12632 typedef __ReplyKData__io_registry_entry_from_path_ool_t ReplyK __attribute__((unused));
12633 typedef __ReplyUData__io_registry_entry_from_path_ool_t ReplyU __attribute__((unused));
12634 typedef __Reply__io_registry_entry_from_path_ool_t Reply __attribute__((unused));
12635 typedef __Request__io_registry_entry_from_path_ool_t __Request __attribute__((unused));
12636
12637 /*
12638 * typedef struct {
12639 * mach_msg_header_t Head;
12640 * NDR_record_t NDR;
12641 * kern_return_t RetCode;
12642 * } mig_reply_error_t;
12643 */
12644
12645 RequestK *InKP = (RequestK *) InHeadP;
12646 RequestU *In0UP = (RequestU *) InDataP;
12647 RequestU *In1UP;
12648 ReplyK *OutKP = (ReplyK *) OutHeadP;
12649 ReplyU *OutUP = (ReplyU *) OutDataP;
12650 (void)OutUP;
12651#ifdef __MIG_check__Request__io_registry_entry_from_path_ool_t__defined
12652 kern_return_t check_result;
12653#endif /* __MIG_check__Request__io_registry_entry_from_path_ool_t__defined */
12654
12655#if __MigKernelSpecificCode
12656#if UseStaticTemplates
12657 const static mach_msg_port_descriptor_t registry_entryTemplate = {
12658 /* name = */ MACH_PORT_NULL,
12659 /* pad1 = */ 0,
12660 /* pad2 = */ 0,
12661 /* disp = */ 17,
12662 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
12663 };
12664#endif /* UseStaticTemplates */
12665
12666#else
12667#if UseStaticTemplates
12668 const static mach_msg_port_descriptor_t registry_entryTemplate = {
12669 /* name = */ MACH_PORT_NULL,
12670 /* pad1 = */ 0,
12671 /* pad2 = */ 0,
12672 /* disp = */ 19,
12673 /* type = */ MACH_MSG_PORT_DESCRIPTOR,
12674 };
12675#endif /* UseStaticTemplates */
12676
12677#endif /* __MigKernelSpecificCode */
12678 kern_return_t RetCode;
12679 io_object_t registry_entry;
12680
12681 __DeclareRcvRpc(2886, "io_registry_entry_from_path_ool")
12682 __BeforeRcvRpc(2886, "io_registry_entry_from_path_ool")
12683
12684#if defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined)
12685 check_result = __MIG_check__Request__io_registry_entry_from_path_ool_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP);
12686 if (check_result != MACH_MSG_SUCCESS)
12687 { MIG_RETURN_ERROR(OutKP, check_result); }
12688#endif /* defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined) */
12689
12690#if UseStaticTemplates
12691 OutKP->registry_entry = registry_entryTemplate;
12692#else /* UseStaticTemplates */
12693#if __MigKernelSpecificCode
12694 OutKP->registry_entry.disposition = 17;
12695#else
12696 OutKP->registry_entry.disposition = 19;
12697#endif /* __MigKernelSpecificCode */
12698#if !(defined(KERNEL) && defined(__LP64__))
12699 OutKP->registry_entry.pad1 = 0;
12700#endif
12701 OutKP->registry_entry.pad2 = 0;
12702 OutKP->registry_entry.type = MACH_MSG_PORT_DESCRIPTOR;
12703#if defined(KERNEL)
12704 OutKP->registry_entry.pad_end = 0;
12705#endif
12706#endif /* UseStaticTemplates */
12707
12708
12709 RetCode = is_io_registry_entry_from_path_ool(main_port: InKP->Head.msgh_request_port, path: In0UP->path, path_ool: (io_buf_ptr_t)(InKP->path_ool.address), path_oolCnt: InKP->path_ool.size, result: &OutUP->result, registry_entry: &registry_entry);
12710 if (RetCode != KERN_SUCCESS) {
12711 MIG_RETURN_ERROR(OutKP, RetCode);
12712 }
12713#if __MigKernelSpecificCode
12714#endif /* __MigKernelSpecificCode */
12715 OutKP->registry_entry.name = (mach_port_t)iokit_make_object_port(obj: registry_entry);
12716
12717
12718 OutUP->NDR = NDR_record;
12719
12720
12721 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
12722 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
12723 OutKP->msgh_body.msgh_descriptor_count = 1;
12724 __AfterRcvRpc(2886, "io_registry_entry_from_path_ool")
12725}
12726
12727#if ( __MigTypeCheck )
12728#if __MIG_check__Request__iokit_subsystem__
12729#if !defined(__MIG_check__Request__io_device_tree_entry_exists_with_name_t__defined)
12730#define __MIG_check__Request__io_device_tree_entry_exists_with_name_t__defined
12731
12732mig_internal kern_return_t __MIG_check__Request__io_device_tree_entry_exists_with_name_t(
12733 __attribute__((__unused__)) __RequestKData__io_device_tree_entry_exists_with_name_t *InKP,
12734 __attribute__((__unused__)) __RequestUData__io_device_tree_entry_exists_with_name_t *In0UP,
12735 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
12736{
12737
12738 typedef __Request__io_device_tree_entry_exists_with_name_t __Request;
12739 typedef __RequestUData__io_device_tree_entry_exists_with_name_t __RequestU __attribute__((unused));
12740#if __MigTypeCheck
12741 unsigned int msgh_size;
12742#endif /* __MigTypeCheck */
12743
12744#if __MigTypeCheck
12745 msgh_size = InKP->Head.msgh_size;
12746 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
12747 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
12748 return MIG_BAD_ARGUMENTS;
12749#endif /* __MigTypeCheck */
12750
12751#if defined(__NDR_convert__int_rep__Request__io_device_tree_entry_exists_with_name_t__nameCnt__defined)
12752 if (In0UP->NDR.int_rep != NDR_record.int_rep)
12753 __NDR_convert__int_rep__Request__io_device_tree_entry_exists_with_name_t__nameCnt(&In0UP->nameCnt, In0UP->NDR.int_rep);
12754#endif /* __NDR_convert__int_rep__Request__io_device_tree_entry_exists_with_name_t__nameCnt__defined */
12755#if __MigTypeCheck
12756 if (In0UP->nameCnt > 128)
12757 return MIG_BAD_ARGUMENTS;
12758 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0UP->nameCnt) ||
12759 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0UP->nameCnt)))
12760 return MIG_BAD_ARGUMENTS;
12761#endif /* __MigTypeCheck */
12762
12763#if __MigTypeCheck
12764 {
12765 char * msg_limit = (char *) InTrailerP;
12766#if __MigKernelSpecificCode
12767 size_t strnlen_limit;
12768#else
12769 size_t memchr_limit;
12770#endif /* __MigKernelSpecificCode */
12771
12772#if __MigKernelSpecificCode
12773 strnlen_limit = min((msg_limit - In0UP->name), 128);
12774 if (( strnlen(s: In0UP->name, n: strnlen_limit) >= 128 + 1 ))
12775 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12776#else
12777 memchr_limit = min((msg_limit - In0UP->name), 128);
12778 if (( memchr(In0UP->name, '\0', memchr_limit) == NULL ))
12779 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
12780#endif /* __MigKernelSpecificCode */
12781 }
12782#endif /* __MigTypeCheck */
12783
12784 return MACH_MSG_SUCCESS;
12785}
12786#endif /* !defined(__MIG_check__Request__io_device_tree_entry_exists_with_name_t__defined) */
12787#endif /* __MIG_check__Request__iokit_subsystem__ */
12788#endif /* ( __MigTypeCheck ) */
12789
12790
12791/* Routine io_device_tree_entry_exists_with_name */
12792mig_internal novalue _Xio_device_tree_entry_exists_with_name
12793 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
12794 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
12795 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
12796{
12797
12798#ifdef __MigPackStructs
12799#pragma pack(push, 4)
12800#endif
12801 typedef struct {
12802 NDR_record_t NDR;
12803 mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
12804 mach_msg_type_number_t nameCnt;
12805 char name[128];
12806 mach_msg_trailer_t trailer;
12807 char padding[0]; /* Avoid generating empty UData structs */
12808 } RequestU __attribute__((unused));
12809#ifdef __MigPackStructs
12810#pragma pack(pop)
12811#endif
12812 typedef __RequestKData__io_device_tree_entry_exists_with_name_t RequestK;
12813 typedef __RequestUData__io_device_tree_entry_exists_with_name_t __RequestU;
12814 typedef __ReplyKData__io_device_tree_entry_exists_with_name_t ReplyK __attribute__((unused));
12815 typedef __ReplyUData__io_device_tree_entry_exists_with_name_t ReplyU __attribute__((unused));
12816 typedef __Reply__io_device_tree_entry_exists_with_name_t Reply __attribute__((unused));
12817 typedef __Request__io_device_tree_entry_exists_with_name_t __Request __attribute__((unused));
12818
12819 /*
12820 * typedef struct {
12821 * mach_msg_header_t Head;
12822 * NDR_record_t NDR;
12823 * kern_return_t RetCode;
12824 * } mig_reply_error_t;
12825 */
12826
12827 RequestK *InKP = (RequestK *) InHeadP;
12828 RequestU *In0UP = (RequestU *) InDataP;
12829 ReplyK *OutKP = (ReplyK *) OutHeadP;
12830 ReplyU *OutUP = (ReplyU *) OutDataP;
12831 (void)OutUP;
12832#ifdef __MIG_check__Request__io_device_tree_entry_exists_with_name_t__defined
12833 kern_return_t check_result;
12834#endif /* __MIG_check__Request__io_device_tree_entry_exists_with_name_t__defined */
12835
12836#if __MigKernelSpecificCode
12837#else
12838#endif /* __MigKernelSpecificCode */
12839 __DeclareRcvRpc(2887, "io_device_tree_entry_exists_with_name")
12840 __BeforeRcvRpc(2887, "io_device_tree_entry_exists_with_name")
12841
12842#if defined(__MIG_check__Request__io_device_tree_entry_exists_with_name_t__defined)
12843 check_result = __MIG_check__Request__io_device_tree_entry_exists_with_name_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
12844 if (check_result != MACH_MSG_SUCCESS)
12845 { MIG_RETURN_ERROR(OutKP, check_result); }
12846#endif /* defined(__MIG_check__Request__io_device_tree_entry_exists_with_name_t__defined) */
12847
12848 OutUP->RetCode = is_io_device_tree_entry_exists_with_name(main_port: InKP->Head.msgh_request_port, name: In0UP->name, exists: &OutUP->exists);
12849 if (OutUP->RetCode != KERN_SUCCESS) {
12850 MIG_RETURN_ERROR(OutKP, OutUP->RetCode);
12851 }
12852#if __MigKernelSpecificCode
12853#endif /* __MigKernelSpecificCode */
12854
12855 OutUP->NDR = NDR_record;
12856
12857
12858 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
12859 __AfterRcvRpc(2887, "io_device_tree_entry_exists_with_name")
12860}
12861
12862#if ( __MigTypeCheck )
12863#if __MIG_check__Request__iokit_subsystem__
12864#if !defined(__MIG_check__Request__io_registry_entry_get_properties_bin_buf_t__defined)
12865#define __MIG_check__Request__io_registry_entry_get_properties_bin_buf_t__defined
12866
12867mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_properties_bin_buf_t(
12868 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_properties_bin_buf_t *InKP,
12869 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_properties_bin_buf_t *In0UP,
12870 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
12871{
12872
12873 typedef __Request__io_registry_entry_get_properties_bin_buf_t __Request;
12874 typedef __RequestUData__io_registry_entry_get_properties_bin_buf_t __RequestU __attribute__((unused));
12875#if __MigTypeCheck
12876 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
12877 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
12878 return MIG_BAD_ARGUMENTS;
12879#endif /* __MigTypeCheck */
12880
12881 return MACH_MSG_SUCCESS;
12882}
12883#endif /* !defined(__MIG_check__Request__io_registry_entry_get_properties_bin_buf_t__defined) */
12884#endif /* __MIG_check__Request__iokit_subsystem__ */
12885#endif /* ( __MigTypeCheck ) */
12886
12887
12888/* Routine io_registry_entry_get_properties_bin_buf */
12889mig_internal novalue _Xio_registry_entry_get_properties_bin_buf
12890 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
12891 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
12892 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
12893{
12894
12895#ifdef __MigPackStructs
12896#pragma pack(push, 4)
12897#endif
12898 typedef struct {
12899 NDR_record_t NDR;
12900 mach_vm_address_t buf;
12901 mach_vm_size_t bufsize;
12902 mach_msg_trailer_t trailer;
12903 char padding[0]; /* Avoid generating empty UData structs */
12904 } RequestU __attribute__((unused));
12905#ifdef __MigPackStructs
12906#pragma pack(pop)
12907#endif
12908 typedef __RequestKData__io_registry_entry_get_properties_bin_buf_t RequestK;
12909 typedef __RequestUData__io_registry_entry_get_properties_bin_buf_t __RequestU;
12910 typedef __ReplyKData__io_registry_entry_get_properties_bin_buf_t ReplyK __attribute__((unused));
12911 typedef __ReplyUData__io_registry_entry_get_properties_bin_buf_t ReplyU __attribute__((unused));
12912 typedef __Reply__io_registry_entry_get_properties_bin_buf_t Reply __attribute__((unused));
12913 typedef __Request__io_registry_entry_get_properties_bin_buf_t __Request __attribute__((unused));
12914
12915 /*
12916 * typedef struct {
12917 * mach_msg_header_t Head;
12918 * NDR_record_t NDR;
12919 * kern_return_t RetCode;
12920 * } mig_reply_error_t;
12921 */
12922
12923 RequestK *InKP = (RequestK *) InHeadP;
12924 RequestU *In0UP = (RequestU *) InDataP;
12925 ReplyK *OutKP = (ReplyK *) OutHeadP;
12926 ReplyU *OutUP = (ReplyU *) OutDataP;
12927 (void)OutUP;
12928#ifdef __MIG_check__Request__io_registry_entry_get_properties_bin_buf_t__defined
12929 kern_return_t check_result;
12930#endif /* __MIG_check__Request__io_registry_entry_get_properties_bin_buf_t__defined */
12931
12932#if __MigKernelSpecificCode
12933#if UseStaticTemplates
12934 const static mach_msg_ool_descriptor_t propertiesTemplate = {
12935 /* addr = */ (void *)0,
12936 /* size = */ 0,
12937 /* deal = */ FALSE,
12938 /* copy = */ MACH_MSG_PHYSICAL_COPY,
12939 /* pad2 = */ 0,
12940 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
12941 };
12942#endif /* UseStaticTemplates */
12943
12944#else
12945#if UseStaticTemplates
12946 const static mach_msg_ool_descriptor_t propertiesTemplate = {
12947 /* addr = */ (void *)0,
12948 /* size = */ 0,
12949 /* deal = */ FALSE,
12950 /* copy = */ MACH_MSG_PHYSICAL_COPY,
12951 /* pad2 = */ 0,
12952 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
12953 };
12954#endif /* UseStaticTemplates */
12955
12956#endif /* __MigKernelSpecificCode */
12957 kern_return_t RetCode;
12958 io_object_t registry_entry;
12959
12960 __DeclareRcvRpc(2888, "io_registry_entry_get_properties_bin_buf")
12961 __BeforeRcvRpc(2888, "io_registry_entry_get_properties_bin_buf")
12962
12963#if defined(__MIG_check__Request__io_registry_entry_get_properties_bin_buf_t__defined)
12964 check_result = __MIG_check__Request__io_registry_entry_get_properties_bin_buf_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
12965 if (check_result != MACH_MSG_SUCCESS)
12966 { MIG_RETURN_ERROR(OutKP, check_result); }
12967#endif /* defined(__MIG_check__Request__io_registry_entry_get_properties_bin_buf_t__defined) */
12968
12969#if UseStaticTemplates
12970 OutKP->properties = propertiesTemplate;
12971#else /* UseStaticTemplates */
12972 OutKP->properties.deallocate = FALSE;
12973 OutKP->properties.copy = MACH_MSG_PHYSICAL_COPY;
12974 OutKP->properties.pad1 = 0;
12975 OutKP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
12976#if defined(KERNEL) && !defined(__LP64__)
12977 OutKP->properties.pad_end = 0;
12978#endif
12979#endif /* UseStaticTemplates */
12980
12981
12982 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
12983
12984 RetCode = is_io_registry_entry_get_properties_bin_buf(registry_entry, buf: In0UP->buf, bufsize: &In0UP->bufsize, properties: (io_buf_ptr_t *)&(OutKP->properties.address), propertiesCnt: &OutUP->propertiesCnt);
12985 iokit_remove_reference(obj: registry_entry);
12986 if (RetCode != KERN_SUCCESS) {
12987 MIG_RETURN_ERROR(OutKP, RetCode);
12988 }
12989#if __MigKernelSpecificCode
12990#endif /* __MigKernelSpecificCode */
12991 OutKP->properties.size = OutUP->propertiesCnt;
12992
12993
12994 OutUP->NDR = NDR_record;
12995
12996
12997 OutUP->bufsize = In0UP->bufsize;
12998
12999 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
13000 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
13001 OutKP->msgh_body.msgh_descriptor_count = 1;
13002 __AfterRcvRpc(2888, "io_registry_entry_get_properties_bin_buf")
13003}
13004
13005#if ( __MigTypeCheck )
13006#if __MIG_check__Request__iokit_subsystem__
13007#if !defined(__MIG_check__Request__io_registry_entry_get_property_bin_buf_t__defined)
13008#define __MIG_check__Request__io_registry_entry_get_property_bin_buf_t__defined
13009
13010mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_bin_buf_t(
13011 __attribute__((__unused__)) __RequestKData__io_registry_entry_get_property_bin_buf_t *InKP,
13012 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bin_buf_t *In0UP,
13013 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
13014 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bin_buf_t **In1UPP,
13015 __attribute__((__unused__)) __RequestUData__io_registry_entry_get_property_bin_buf_t **In2UPP)
13016{
13017
13018 typedef __Request__io_registry_entry_get_property_bin_buf_t __Request;
13019 typedef __RequestUData__io_registry_entry_get_property_bin_buf_t __RequestU __attribute__((unused));
13020 __RequestU *In1UP;
13021 __RequestU *In2UP;
13022#if __MigTypeCheck
13023 unsigned int msgh_size;
13024#endif /* __MigTypeCheck */
13025 unsigned int msgh_size_delta;
13026
13027#if __MigTypeCheck
13028 msgh_size = InKP->Head.msgh_size;
13029 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
13030 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256)) || (msgh_size > (mach_msg_size_t)sizeof(__Request)))
13031 return MIG_BAD_ARGUMENTS;
13032#endif /* __MigTypeCheck */
13033
13034#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_buf_t__planeCnt__defined)
13035 if (In0UP->NDR.int_rep != NDR_record.int_rep)
13036 __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_buf_t__planeCnt(&In0UP->planeCnt, In0UP->NDR.int_rep);
13037#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_buf_t__planeCnt__defined */
13038 msgh_size_delta = _WALIGN_(In0UP->planeCnt);
13039#if __MigTypeCheck
13040 if (In0UP->planeCnt > 128)
13041 return MIG_BAD_ARGUMENTS;
13042 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In0UP->planeCnt) ||
13043 (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In0UP->planeCnt)))
13044 return MIG_BAD_ARGUMENTS;
13045 msgh_size -= msgh_size_delta;
13046#endif /* __MigTypeCheck */
13047
13048 *In1UPP = In1UP = (__RequestU *) ((pointer_t) In0UP + msgh_size_delta - 128);
13049
13050#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_buf_t__property_nameCnt__defined)
13051 if (In0UP->NDR.int_rep != NDR_record.int_rep)
13052 __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_buf_t__property_nameCnt(&In1UP->property_nameCnt, In1UP->NDR.int_rep);
13053#endif /* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_buf_t__property_nameCnt__defined */
13054 msgh_size_delta = _WALIGN_(In1UP->property_nameCnt);
13055#if __MigTypeCheck
13056 if (In1UP->property_nameCnt > 128)
13057 return MIG_BAD_ARGUMENTS;
13058 if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In1UP->property_nameCnt) ||
13059 (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In1UP->property_nameCnt)))
13060 return MIG_BAD_ARGUMENTS;
13061#endif /* __MigTypeCheck */
13062
13063 *In2UPP = In2UP = (__RequestU *) ((pointer_t) In1UP + msgh_size_delta - 128);
13064
13065#if __MigTypeCheck
13066 {
13067 char * msg_limit = (char *) InTrailerP;
13068#if __MigKernelSpecificCode
13069 size_t strnlen_limit;
13070#else
13071 size_t memchr_limit;
13072#endif /* __MigKernelSpecificCode */
13073
13074#if __MigKernelSpecificCode
13075 strnlen_limit = min((msg_limit - In0UP->plane), 128);
13076 if (( strnlen(s: In0UP->plane, n: strnlen_limit) >= 128 + 1 ))
13077 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
13078#else
13079 memchr_limit = min((msg_limit - In0UP->plane), 128);
13080 if (( memchr(In0UP->plane, '\0', memchr_limit) == NULL ))
13081 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
13082#endif /* __MigKernelSpecificCode */
13083#if __MigKernelSpecificCode
13084 strnlen_limit = min((msg_limit - In1UP->property_name), 128);
13085 if (( strnlen(s: In1UP->property_name, n: strnlen_limit) >= 128 + 1 ))
13086 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
13087#else
13088 memchr_limit = min((msg_limit - In1UP->property_name), 128);
13089 if (( memchr(In1UP->property_name, '\0', memchr_limit) == NULL ))
13090 return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
13091#endif /* __MigKernelSpecificCode */
13092 }
13093#endif /* __MigTypeCheck */
13094
13095 return MACH_MSG_SUCCESS;
13096}
13097#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_bin_buf_t__defined) */
13098#endif /* __MIG_check__Request__iokit_subsystem__ */
13099#endif /* ( __MigTypeCheck ) */
13100
13101
13102/* Routine io_registry_entry_get_property_bin_buf */
13103mig_internal novalue _Xio_registry_entry_get_property_bin_buf
13104 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
13105 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
13106 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
13107{
13108
13109#ifdef __MigPackStructs
13110#pragma pack(push, 4)
13111#endif
13112 typedef struct {
13113 NDR_record_t NDR;
13114 mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
13115 mach_msg_type_number_t planeCnt;
13116 char plane[128];
13117 mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
13118 mach_msg_type_number_t property_nameCnt;
13119 char property_name[128];
13120 uint32_t options;
13121 mach_vm_address_t buf;
13122 mach_vm_size_t bufsize;
13123 mach_msg_trailer_t trailer;
13124 char padding[0]; /* Avoid generating empty UData structs */
13125 } RequestU __attribute__((unused));
13126#ifdef __MigPackStructs
13127#pragma pack(pop)
13128#endif
13129 typedef __RequestKData__io_registry_entry_get_property_bin_buf_t RequestK;
13130 typedef __RequestUData__io_registry_entry_get_property_bin_buf_t __RequestU;
13131 typedef __ReplyKData__io_registry_entry_get_property_bin_buf_t ReplyK __attribute__((unused));
13132 typedef __ReplyUData__io_registry_entry_get_property_bin_buf_t ReplyU __attribute__((unused));
13133 typedef __Reply__io_registry_entry_get_property_bin_buf_t Reply __attribute__((unused));
13134 typedef __Request__io_registry_entry_get_property_bin_buf_t __Request __attribute__((unused));
13135
13136 /*
13137 * typedef struct {
13138 * mach_msg_header_t Head;
13139 * NDR_record_t NDR;
13140 * kern_return_t RetCode;
13141 * } mig_reply_error_t;
13142 */
13143
13144 RequestK *InKP = (RequestK *) InHeadP;
13145 RequestU *In0UP = (RequestU *) InDataP;
13146 RequestU *In1UP;
13147 RequestU *In2UP;
13148 ReplyK *OutKP = (ReplyK *) OutHeadP;
13149 ReplyU *OutUP = (ReplyU *) OutDataP;
13150 (void)OutUP;
13151#ifdef __MIG_check__Request__io_registry_entry_get_property_bin_buf_t__defined
13152 kern_return_t check_result;
13153#endif /* __MIG_check__Request__io_registry_entry_get_property_bin_buf_t__defined */
13154
13155#if __MigKernelSpecificCode
13156#if UseStaticTemplates
13157 const static mach_msg_ool_descriptor_t propertiesTemplate = {
13158 /* addr = */ (void *)0,
13159 /* size = */ 0,
13160 /* deal = */ FALSE,
13161 /* copy = */ MACH_MSG_PHYSICAL_COPY,
13162 /* pad2 = */ 0,
13163 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
13164 };
13165#endif /* UseStaticTemplates */
13166
13167#else
13168#if UseStaticTemplates
13169 const static mach_msg_ool_descriptor_t propertiesTemplate = {
13170 /* addr = */ (void *)0,
13171 /* size = */ 0,
13172 /* deal = */ FALSE,
13173 /* copy = */ MACH_MSG_PHYSICAL_COPY,
13174 /* pad2 = */ 0,
13175 /* type = */ MACH_MSG_OOL_DESCRIPTOR,
13176 };
13177#endif /* UseStaticTemplates */
13178
13179#endif /* __MigKernelSpecificCode */
13180 kern_return_t RetCode;
13181 io_object_t registry_entry;
13182
13183 __DeclareRcvRpc(2889, "io_registry_entry_get_property_bin_buf")
13184 __BeforeRcvRpc(2889, "io_registry_entry_get_property_bin_buf")
13185
13186#if defined(__MIG_check__Request__io_registry_entry_get_property_bin_buf_t__defined)
13187 check_result = __MIG_check__Request__io_registry_entry_get_property_bin_buf_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP, In1UPP: (__RequestU **)&In1UP, In2UPP: (__RequestU **)&In2UP);
13188 if (check_result != MACH_MSG_SUCCESS)
13189 { MIG_RETURN_ERROR(OutKP, check_result); }
13190#endif /* defined(__MIG_check__Request__io_registry_entry_get_property_bin_buf_t__defined) */
13191
13192#if UseStaticTemplates
13193 OutKP->properties = propertiesTemplate;
13194#else /* UseStaticTemplates */
13195 OutKP->properties.deallocate = FALSE;
13196 OutKP->properties.copy = MACH_MSG_PHYSICAL_COPY;
13197 OutKP->properties.pad1 = 0;
13198 OutKP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
13199#if defined(KERNEL) && !defined(__LP64__)
13200 OutKP->properties.pad_end = 0;
13201#endif
13202#endif /* UseStaticTemplates */
13203
13204
13205 registry_entry = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
13206
13207 RetCode = is_io_registry_entry_get_property_bin_buf(registry_entry, plane: In0UP->plane, property_name: In1UP->property_name, options: In2UP->options, buf: In2UP->buf, bufsize: &In2UP->bufsize, properties: (io_buf_ptr_t *)&(OutKP->properties.address), propertiesCnt: &OutUP->propertiesCnt);
13208 iokit_remove_reference(obj: registry_entry);
13209 if (RetCode != KERN_SUCCESS) {
13210 MIG_RETURN_ERROR(OutKP, RetCode);
13211 }
13212#if __MigKernelSpecificCode
13213#endif /* __MigKernelSpecificCode */
13214 OutKP->properties.size = OutUP->propertiesCnt;
13215
13216
13217 OutUP->NDR = NDR_record;
13218
13219
13220 OutUP->bufsize = In2UP->bufsize;
13221
13222 OutKP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
13223 OutKP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
13224 OutKP->msgh_body.msgh_descriptor_count = 1;
13225 __AfterRcvRpc(2889, "io_registry_entry_get_property_bin_buf")
13226}
13227
13228#if ( __MigTypeCheck )
13229#if __MIG_check__Request__iokit_subsystem__
13230#if !defined(__MIG_check__Request__io_service_wait_quiet_with_options_t__defined)
13231#define __MIG_check__Request__io_service_wait_quiet_with_options_t__defined
13232
13233mig_internal kern_return_t __MIG_check__Request__io_service_wait_quiet_with_options_t(
13234 __attribute__((__unused__)) __RequestKData__io_service_wait_quiet_with_options_t *InKP,
13235 __attribute__((__unused__)) __RequestUData__io_service_wait_quiet_with_options_t *In0UP,
13236 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
13237{
13238
13239 typedef __Request__io_service_wait_quiet_with_options_t __Request;
13240 typedef __RequestUData__io_service_wait_quiet_with_options_t __RequestU __attribute__((unused));
13241#if __MigTypeCheck
13242 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
13243 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
13244 return MIG_BAD_ARGUMENTS;
13245#endif /* __MigTypeCheck */
13246
13247 return MACH_MSG_SUCCESS;
13248}
13249#endif /* !defined(__MIG_check__Request__io_service_wait_quiet_with_options_t__defined) */
13250#endif /* __MIG_check__Request__iokit_subsystem__ */
13251#endif /* ( __MigTypeCheck ) */
13252
13253
13254/* Routine io_service_wait_quiet_with_options */
13255mig_internal novalue _Xio_service_wait_quiet_with_options
13256 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
13257 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
13258 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
13259{
13260
13261#ifdef __MigPackStructs
13262#pragma pack(push, 4)
13263#endif
13264 typedef struct {
13265 NDR_record_t NDR;
13266 mach_timespec_t wait_time;
13267 uint32_t options;
13268 mach_msg_trailer_t trailer;
13269 char padding[0]; /* Avoid generating empty UData structs */
13270 } RequestU __attribute__((unused));
13271#ifdef __MigPackStructs
13272#pragma pack(pop)
13273#endif
13274 typedef __RequestKData__io_service_wait_quiet_with_options_t RequestK;
13275 typedef __RequestUData__io_service_wait_quiet_with_options_t __RequestU;
13276 typedef __ReplyKData__io_service_wait_quiet_with_options_t ReplyK __attribute__((unused));
13277 typedef __ReplyUData__io_service_wait_quiet_with_options_t ReplyU __attribute__((unused));
13278 typedef __Reply__io_service_wait_quiet_with_options_t Reply __attribute__((unused));
13279 typedef __Request__io_service_wait_quiet_with_options_t __Request __attribute__((unused));
13280
13281 /*
13282 * typedef struct {
13283 * mach_msg_header_t Head;
13284 * NDR_record_t NDR;
13285 * kern_return_t RetCode;
13286 * } mig_reply_error_t;
13287 */
13288
13289 RequestK *InKP = (RequestK *) InHeadP;
13290 RequestU *In0UP = (RequestU *) InDataP;
13291 ReplyK *OutKP = (ReplyK *) OutHeadP;
13292 ReplyU *OutUP = (ReplyU *) OutDataP;
13293 (void)OutUP;
13294#ifdef __MIG_check__Request__io_service_wait_quiet_with_options_t__defined
13295 kern_return_t check_result;
13296#endif /* __MIG_check__Request__io_service_wait_quiet_with_options_t__defined */
13297
13298#if __MigKernelSpecificCode
13299#else
13300#endif /* __MigKernelSpecificCode */
13301 io_object_t service;
13302
13303 __DeclareRcvRpc(2890, "io_service_wait_quiet_with_options")
13304 __BeforeRcvRpc(2890, "io_service_wait_quiet_with_options")
13305
13306#if defined(__MIG_check__Request__io_service_wait_quiet_with_options_t__defined)
13307 check_result = __MIG_check__Request__io_service_wait_quiet_with_options_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
13308 if (check_result != MACH_MSG_SUCCESS)
13309 { MIG_RETURN_ERROR(OutKP, check_result); }
13310#endif /* defined(__MIG_check__Request__io_service_wait_quiet_with_options_t__defined) */
13311
13312 service = iokit_lookup_object_port(port: InKP->Head.msgh_request_port);
13313
13314 OutUP->RetCode = is_io_service_wait_quiet_with_options(service, wait_time: In0UP->wait_time, options: In0UP->options);
13315 iokit_remove_reference(obj: service);
13316#if __MigKernelSpecificCode
13317#endif /* __MigKernelSpecificCode */
13318
13319 OutUP->NDR = NDR_record;
13320
13321
13322 __AfterRcvRpc(2890, "io_service_wait_quiet_with_options")
13323}
13324
13325
13326
13327/* Description of this kernel subsystem, for use in direct RPC */
13328const struct is_iokit_subsystem is_iokit_subsystem = {
13329 iokit_server_routine,
13330 2800,
13331 2891,
13332 (mach_msg_size_t)sizeof(union __ReplyUnion__is_iokit_subsystem),
13333 (vm_address_t)0,
13334 {
13335 { (mig_impl_routine_t) 0,
13336 (mig_stub_kern_routine_t) _Xio_object_get_class, 2, 0, 0, (mach_msg_size_t)sizeof(__Reply__io_object_get_class_t)},
13337 { .impl_routine: (mig_impl_routine_t) 0,
13338 .kstub_routine: (mig_stub_kern_routine_t) _Xio_object_conforms_to, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_object_conforms_to_t)},
13339 { .impl_routine: (mig_impl_routine_t) 0,
13340 .kstub_routine: (mig_stub_kern_routine_t) _Xio_iterator_next, .argc: 2, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_iterator_next_t)},
13341 { .impl_routine: (mig_impl_routine_t) 0,
13342 .kstub_routine: (mig_stub_kern_routine_t) _Xio_iterator_reset, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_iterator_reset_t)},
13343 { .impl_routine: (mig_impl_routine_t) 0,
13344 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_matching_services, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_services_t)},
13345 { .impl_routine: (mig_impl_routine_t) 0,
13346 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_property, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_t)},
13347 { .impl_routine: (mig_impl_routine_t) 0,
13348 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_create_iterator, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_create_iterator_t)},
13349 { .impl_routine: (mig_impl_routine_t) 0,
13350 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_iterator_enter_entry, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_iterator_enter_entry_t)},
13351 { .impl_routine: (mig_impl_routine_t) 0,
13352 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_iterator_exit_entry, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_iterator_exit_entry_t)},
13353 { .impl_routine: (mig_impl_routine_t) 0,
13354 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_from_path, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_from_path_t)},
13355 { .impl_routine: (mig_impl_routine_t) 0,
13356 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_name, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_name_t)},
13357 { .impl_routine: (mig_impl_routine_t) 0,
13358 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_properties, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_properties_t)},
13359 { .impl_routine: (mig_impl_routine_t) 0,
13360 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_property_bytes, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_bytes_t)},
13361 { .impl_routine: (mig_impl_routine_t) 0,
13362 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_child_iterator, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_child_iterator_t)},
13363 { .impl_routine: (mig_impl_routine_t) 0,
13364 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_parent_iterator, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_parent_iterator_t)},
13365 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
13366 { .impl_routine: (mig_impl_routine_t) 0,
13367 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_close, .argc: 1, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_close_t)},
13368 { .impl_routine: (mig_impl_routine_t) 0,
13369 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_get_service, .argc: 2, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_get_service_t)},
13370 { .impl_routine: (mig_impl_routine_t) 0,
13371 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_set_notification_port, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_set_notification_port_t)},
13372 { .impl_routine: (mig_impl_routine_t) 0,
13373 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_map_memory, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_map_memory_t)},
13374 { .impl_routine: (mig_impl_routine_t) 0,
13375 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_add_client, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_add_client_t)},
13376 { .impl_routine: (mig_impl_routine_t) 0,
13377 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_set_properties, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_set_properties_t)},
13378 { .impl_routine: (mig_impl_routine_t) 0,
13379 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_method_scalarI_scalarO, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_method_scalarI_scalarO_t)},
13380 { .impl_routine: (mig_impl_routine_t) 0,
13381 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_method_scalarI_structureO, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_method_scalarI_structureO_t)},
13382 { .impl_routine: (mig_impl_routine_t) 0,
13383 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_method_scalarI_structureI, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_method_scalarI_structureI_t)},
13384 { .impl_routine: (mig_impl_routine_t) 0,
13385 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_method_structureI_structureO, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_method_structureI_structureO_t)},
13386 { .impl_routine: (mig_impl_routine_t) 0,
13387 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_path, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_path_t)},
13388 { .impl_routine: (mig_impl_routine_t) 0,
13389 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_get_root_entry, .argc: 2, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_get_root_entry_t)},
13390 { .impl_routine: (mig_impl_routine_t) 0,
13391 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_set_properties, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_set_properties_t)},
13392 { .impl_routine: (mig_impl_routine_t) 0,
13393 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_in_plane, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_in_plane_t)},
13394 { .impl_routine: (mig_impl_routine_t) 0,
13395 .kstub_routine: (mig_stub_kern_routine_t) _Xio_object_get_retain_count, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_object_get_retain_count_t)},
13396 { .impl_routine: (mig_impl_routine_t) 0,
13397 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_busy_state, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_busy_state_t)},
13398 { .impl_routine: (mig_impl_routine_t) 0,
13399 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_wait_quiet, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_wait_quiet_t)},
13400 { .impl_routine: (mig_impl_routine_t) 0,
13401 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_create_iterator, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_create_iterator_t)},
13402 { .impl_routine: (mig_impl_routine_t) 0,
13403 .kstub_routine: (mig_stub_kern_routine_t) _Xio_iterator_is_valid, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_iterator_is_valid_t)},
13404 {.impl_routine: 0, .kstub_routine: 0, .argc: 0, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: 0},
13405 { .impl_routine: (mig_impl_routine_t) 0,
13406 .kstub_routine: (mig_stub_kern_routine_t) _Xio_catalog_send_data, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_catalog_send_data_t)},
13407 { .impl_routine: (mig_impl_routine_t) 0,
13408 .kstub_routine: (mig_stub_kern_routine_t) _Xio_catalog_terminate, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_catalog_terminate_t)},
13409 { .impl_routine: (mig_impl_routine_t) 0,
13410 .kstub_routine: (mig_stub_kern_routine_t) _Xio_catalog_get_data, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_catalog_get_data_t)},
13411 { .impl_routine: (mig_impl_routine_t) 0,
13412 .kstub_routine: (mig_stub_kern_routine_t) _Xio_catalog_get_gen_count, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_catalog_get_gen_count_t)},
13413 { .impl_routine: (mig_impl_routine_t) 0,
13414 .kstub_routine: (mig_stub_kern_routine_t) _Xio_catalog_module_loaded, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_catalog_module_loaded_t)},
13415 { .impl_routine: (mig_impl_routine_t) 0,
13416 .kstub_routine: (mig_stub_kern_routine_t) _Xio_catalog_reset, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_catalog_reset_t)},
13417 { .impl_routine: (mig_impl_routine_t) 0,
13418 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_request_probe, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_request_probe_t)},
13419 { .impl_routine: (mig_impl_routine_t) 0,
13420 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_name_in_plane, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_name_in_plane_t)},
13421 { .impl_routine: (mig_impl_routine_t) 0,
13422 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_match_property_table, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_match_property_table_t)},
13423 { .impl_routine: (mig_impl_routine_t) 0,
13424 .kstub_routine: (mig_stub_kern_routine_t) _Xio_async_method_scalarI_scalarO, .argc: 9, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_async_method_scalarI_scalarO_t)},
13425 { .impl_routine: (mig_impl_routine_t) 0,
13426 .kstub_routine: (mig_stub_kern_routine_t) _Xio_async_method_scalarI_structureO, .argc: 9, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_async_method_scalarI_structureO_t)},
13427 { .impl_routine: (mig_impl_routine_t) 0,
13428 .kstub_routine: (mig_stub_kern_routine_t) _Xio_async_method_scalarI_structureI, .argc: 9, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_async_method_scalarI_structureI_t)},
13429 { .impl_routine: (mig_impl_routine_t) 0,
13430 .kstub_routine: (mig_stub_kern_routine_t) _Xio_async_method_structureI_structureO, .argc: 9, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_async_method_structureI_structureO_t)},
13431 { .impl_routine: (mig_impl_routine_t) 0,
13432 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_notification, .argc: 7, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_t)},
13433 { .impl_routine: (mig_impl_routine_t) 0,
13434 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_interest_notification, .argc: 6, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_interest_notification_t)},
13435 { .impl_routine: (mig_impl_routine_t) 0,
13436 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_acknowledge_notification, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_acknowledge_notification_t)},
13437 { .impl_routine: (mig_impl_routine_t) 0,
13438 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_get_notification_semaphore, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_get_notification_semaphore_t)},
13439 { .impl_routine: (mig_impl_routine_t) 0,
13440 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_unmap_memory, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_unmap_memory_t)},
13441 { .impl_routine: (mig_impl_routine_t) 0,
13442 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_location_in_plane, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_location_in_plane_t)},
13443 { .impl_routine: (mig_impl_routine_t) 0,
13444 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_property_recursively, .argc: 6, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_recursively_t)},
13445 { .impl_routine: (mig_impl_routine_t) 0,
13446 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_state, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_state_t)},
13447 { .impl_routine: (mig_impl_routine_t) 0,
13448 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_matching_services_ool, .argc: 5, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_services_ool_t)},
13449 { .impl_routine: (mig_impl_routine_t) 0,
13450 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_match_property_table_ool, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_match_property_table_ool_t)},
13451 { .impl_routine: (mig_impl_routine_t) 0,
13452 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_notification_ool, .argc: 9, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_ool_t)},
13453 { .impl_routine: (mig_impl_routine_t) 0,
13454 .kstub_routine: (mig_stub_kern_routine_t) _Xio_object_get_superclass, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_object_get_superclass_t)},
13455 { .impl_routine: (mig_impl_routine_t) 0,
13456 .kstub_routine: (mig_stub_kern_routine_t) _Xio_object_get_bundle_identifier, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_object_get_bundle_identifier_t)},
13457 { .impl_routine: (mig_impl_routine_t) 0,
13458 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_open_extended, .argc: 8, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_open_extended_t)},
13459 { .impl_routine: (mig_impl_routine_t) 0,
13460 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_map_memory_into_task, .argc: 6, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_map_memory_into_task_t)},
13461 { .impl_routine: (mig_impl_routine_t) 0,
13462 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_unmap_memory_from_task, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_unmap_memory_from_task_t)},
13463 { .impl_routine: (mig_impl_routine_t) 0,
13464 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_method, .argc: 17, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_method_t)},
13465 { .impl_routine: (mig_impl_routine_t) 0,
13466 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_async_method, .argc: 20, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_async_method_t)},
13467 { .impl_routine: (mig_impl_routine_t) 0,
13468 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_set_notification_port_64, .argc: 5, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_set_notification_port_64_t)},
13469 { .impl_routine: (mig_impl_routine_t) 0,
13470 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_notification_64, .argc: 7, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_64_t)},
13471 { .impl_routine: (mig_impl_routine_t) 0,
13472 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_interest_notification_64, .argc: 6, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_interest_notification_64_t)},
13473 { .impl_routine: (mig_impl_routine_t) 0,
13474 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_notification_ool_64, .argc: 9, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_ool_64_t)},
13475 { .impl_routine: (mig_impl_routine_t) 0,
13476 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_registry_entry_id, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_registry_entry_id_t)},
13477 { .impl_routine: (mig_impl_routine_t) 0,
13478 .kstub_routine: (mig_stub_kern_routine_t) _Xio_connect_method_var_output, .argc: 16, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_connect_method_var_output_t)},
13479 { .impl_routine: (mig_impl_routine_t) 0,
13480 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_matching_service, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_service_t)},
13481 { .impl_routine: (mig_impl_routine_t) 0,
13482 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_matching_service_ool, .argc: 5, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_service_ool_t)},
13483 { .impl_routine: (mig_impl_routine_t) 0,
13484 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_authorization_id, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_authorization_id_t)},
13485 { .impl_routine: (mig_impl_routine_t) 0,
13486 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_set_authorization_id, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_set_authorization_id_t)},
13487 { .impl_routine: (mig_impl_routine_t) 0,
13488 .kstub_routine: (mig_stub_kern_routine_t) _Xio_server_version, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_server_version_t)},
13489 { .impl_routine: (mig_impl_routine_t) 0,
13490 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_properties_bin, .argc: 3, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_properties_bin_t)},
13491 { .impl_routine: (mig_impl_routine_t) 0,
13492 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_property_bin, .argc: 6, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_bin_t)},
13493 { .impl_routine: (mig_impl_routine_t) 0,
13494 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_matching_service_bin, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_service_bin_t)},
13495 { .impl_routine: (mig_impl_routine_t) 0,
13496 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_get_matching_services_bin, .argc: 4, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_services_bin_t)},
13497 { .impl_routine: (mig_impl_routine_t) 0,
13498 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_match_property_table_bin, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_match_property_table_bin_t)},
13499 { .impl_routine: (mig_impl_routine_t) 0,
13500 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_notification_bin, .argc: 8, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_bin_t)},
13501 { .impl_routine: (mig_impl_routine_t) 0,
13502 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_add_notification_bin_64, .argc: 8, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_bin_64_t)},
13503 { .impl_routine: (mig_impl_routine_t) 0,
13504 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_path_ool, .argc: 5, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_path_ool_t)},
13505 { .impl_routine: (mig_impl_routine_t) 0,
13506 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_from_path_ool, .argc: 6, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_from_path_ool_t)},
13507 { .impl_routine: (mig_impl_routine_t) 0,
13508 .kstub_routine: (mig_stub_kern_routine_t) _Xio_device_tree_entry_exists_with_name, .argc: 3, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_device_tree_entry_exists_with_name_t)},
13509 { .impl_routine: (mig_impl_routine_t) 0,
13510 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_properties_bin_buf, .argc: 6, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_properties_bin_buf_t)},
13511 { .impl_routine: (mig_impl_routine_t) 0,
13512 .kstub_routine: (mig_stub_kern_routine_t) _Xio_registry_entry_get_property_bin_buf, .argc: 9, .descr_count: 0, .reply_descr_count: 1, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_bin_buf_t)},
13513 { .impl_routine: (mig_impl_routine_t) 0,
13514 .kstub_routine: (mig_stub_kern_routine_t) _Xio_service_wait_quiet_with_options, .argc: 4, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__io_service_wait_quiet_with_options_t)},
13515 }
13516};
13517
13518mig_external boolean_t iokit_server
13519 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP)
13520{
13521 /*
13522 * typedef struct {
13523 * mach_msg_header_t Head;
13524 * NDR_record_t NDR;
13525 * kern_return_t RetCode;
13526 * } mig_reply_error_t;
13527 */
13528
13529 mig_kern_routine_t routine;
13530
13531 OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
13532 OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
13533 /* Minimal size: routine() will update it if different */
13534 OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
13535 OutHeadP->msgh_local_port = MACH_PORT_NULL;
13536 OutHeadP->msgh_id = InHeadP->msgh_id + 100;
13537 OutHeadP->msgh_reserved = 0;
13538
13539 if ((InHeadP->msgh_id > 2890) || (InHeadP->msgh_id < 2800) ||
13540 ((routine = is_iokit_subsystem.kroutine[InHeadP->msgh_id - 2800].kstub_routine) == 0)) {
13541 ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
13542 ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
13543 return FALSE;
13544 }
13545 (*routine) (InHeadP, InDataP, InTrailerP, OutHeadP, OutDataP);
13546 return TRUE;
13547}
13548
13549mig_external mig_kern_routine_t iokit_server_routine
13550 (mach_msg_header_t *InHeadP)
13551{
13552 int msgh_id;
13553
13554 msgh_id = InHeadP->msgh_id - 2800;
13555
13556 if ((msgh_id > 90) || (msgh_id < 0))
13557 return 0;
13558
13559 return is_iokit_subsystem.kroutine[msgh_id].kstub_routine;
13560}
13561