CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/exploits/CVE-2016-4655/headers/IOKit/IOKitLib.h
Views: 11789
1
/*
2
* Copyright (c) 1998-2014 Apple Computer, Inc. All rights reserved.
3
*
4
* @APPLE_LICENSE_HEADER_START@
5
*
6
* This file contains Original Code and/or Modifications of Original Code
7
* as defined in and that are subject to the Apple Public Source License
8
* Version 2.0 (the 'License'). You may not use this file except in
9
* compliance with the License. Please obtain a copy of the License at
10
* http://www.opensource.apple.com/apsl/ and read it before using this
11
* file.
12
*
13
* The Original Code and all software distributed under the License are
14
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18
* Please see the License for the specific language governing rights and
19
* limitations under the License.
20
*
21
* @APPLE_LICENSE_HEADER_END@
22
*/
23
/*
24
* HISTORY
25
*
26
*/
27
28
/*
29
* IOKit user library
30
*/
31
32
#ifndef _IOKIT_IOKITLIB_H
33
#define _IOKIT_IOKITLIB_H
34
35
#ifdef KERNEL
36
#error This file is not for kernel use
37
#endif
38
39
#include <sys/cdefs.h>
40
#include <sys/types.h>
41
42
#include <mach/mach_types.h>
43
#include <mach/mach_init.h>
44
45
#include <CoreFoundation/CFBase.h>
46
#include <CoreFoundation/CFDictionary.h>
47
#include <CoreFoundation/CFRunLoop.h>
48
49
#include <IOKit/IOTypes.h>
50
#include <IOKit/IOKitKeys.h>
51
52
#include <IOKit/OSMessageNotification.h>
53
54
#include <AvailabilityMacros.h>
55
56
#include <dispatch/dispatch.h>
57
58
__BEGIN_DECLS
59
60
/*! @header IOKitLib
61
IOKitLib implements non-kernel task access to common IOKit object types - IORegistryEntry, IOService, IOIterator etc. These functions are generic - families may provide API that is more specific.<br>
62
IOKitLib represents IOKit objects outside the kernel with the types io_object_t, io_registry_entry_t, io_service_t, & io_connect_t. Function names usually begin with the type of object they are compatible with - eg. IOObjectRelease can be used with any io_object_t. Inside the kernel, the c++ class hierarchy allows the subclasses of each object type to receive the same requests from user level clients, for example in the kernel, IOService is a subclass of IORegistryEntry, which means any of the IORegistryEntryXXX functions in IOKitLib may be used with io_service_t's as well as io_registry_t's. There are functions available to introspect the class of the kernel object which any io_object_t et al. represents.
63
IOKit objects returned by all functions should be released with IOObjectRelease.
64
*/
65
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
66
67
typedef struct IONotificationPort * IONotificationPortRef;
68
69
70
/*! @typedef IOServiceMatchingCallback
71
@abstract Callback function to be notified of IOService publication.
72
@param refcon The refcon passed when the notification was installed.
73
@param iterator The notification iterator which now has new objects.
74
*/
75
typedef void
76
(*IOServiceMatchingCallback)(
77
void * refcon,
78
io_iterator_t iterator );
79
80
/*! @typedef IOServiceInterestCallback
81
@abstract Callback function to be notified of changes in state of an IOService.
82
@param refcon The refcon passed when the notification was installed.
83
@param service The IOService whose state has changed.
84
@param messageType A messageType enum, defined by IOKit/IOMessage.h or by the IOService's family.
85
@param messageArgument An argument for the message, dependent on the messageType. If the message data is larger than sizeof(void*), then messageArgument contains a pointer to the message data; otherwise, messageArgument contains the message data.
86
*/
87
88
typedef void
89
(*IOServiceInterestCallback)(
90
void * refcon,
91
io_service_t service,
92
uint32_t messageType,
93
void * messageArgument );
94
95
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
96
97
/*! @const kIOMasterPortDefault
98
@abstract The default mach port used to initiate communication with IOKit.
99
@discussion When specifying a master port to IOKit functions, the NULL argument indicates "use the default". This is a synonym for NULL, if you'd rather use a named constant.
100
*/
101
102
extern
103
const mach_port_t kIOMasterPortDefault;
104
105
/*! @function IOMasterPort
106
@abstract Returns the mach port used to initiate communication with IOKit.
107
@discussion Functions that don't specify an existing object require the IOKit master port to be passed. This function obtains that port.
108
@param bootstrapPort Pass MACH_PORT_NULL for the default.
109
@param masterPort The master port is returned.
110
@result A kern_return_t error code. */
111
112
kern_return_t
113
IOMasterPort( mach_port_t bootstrapPort,
114
mach_port_t * masterPort );
115
116
117
/*! @function IONotificationPortCreate
118
@abstract Creates and returns a notification object for receiving IOKit notifications of new devices or state changes.
119
@discussion Creates the notification object to receive notifications from IOKit of new device arrivals or state changes. The notification object can be supply a CFRunLoopSource, or mach_port_t to be used to listen for events.
120
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
121
@result A reference to the notification object. */
122
123
IONotificationPortRef
124
IONotificationPortCreate(
125
mach_port_t masterPort );
126
127
/*! @function IONotificationPortDestroy
128
@abstract Destroys a notification object created with IONotificationPortCreate.
129
Also destroys any mach_port's or CFRunLoopSources obatined from
130
<code>@link IONotificationPortGetRunLoopSource @/link</code>
131
or <code>@link IONotificationPortGetMachPort @/link</code>
132
@param notify A reference to the notification object. */
133
134
void
135
IONotificationPortDestroy(
136
IONotificationPortRef notify );
137
138
/*! @function IONotificationPortGetRunLoopSource
139
@abstract Returns a CFRunLoopSource to be used to listen for notifications.
140
@discussion A notification object may deliver notifications to a CFRunLoop
141
by adding the run loop source returned by this function to the run loop.
142
143
The caller should not release this CFRunLoopSource. Just call
144
<code>@link IONotificationPortDestroy @/link</code> to dispose of the
145
IONotificationPortRef and the CFRunLoopSource when done.
146
@param notify The notification object.
147
@result A CFRunLoopSourceRef for the notification object. */
148
149
CFRunLoopSourceRef
150
IONotificationPortGetRunLoopSource(
151
IONotificationPortRef notify );
152
153
/*! @function IONotificationPortGetMachPort
154
@abstract Returns a mach_port to be used to listen for notifications.
155
@discussion A notification object may deliver notifications to a mach messaging client
156
if they listen for messages on the port obtained from this function.
157
Callbacks associated with the notifications may be delivered by calling
158
IODispatchCalloutFromMessage with messages received.
159
160
The caller should not release this mach_port_t. Just call
161
<code>@link IONotificationPortDestroy @/link</code> to dispose of the
162
mach_port_t and IONotificationPortRef when done.
163
@param notify The notification object.
164
@result A mach_port for the notification object. */
165
166
mach_port_t
167
IONotificationPortGetMachPort(
168
IONotificationPortRef notify );
169
170
/*! @function IONotificationPortSetDispatchQueue
171
@abstract Sets a dispatch queue to be used to listen for notifications.
172
@discussion A notification object may deliver notifications to a dispatch client.
173
@param notify The notification object.
174
@param queue A dispatch queue. */
175
176
void
177
IONotificationPortSetDispatchQueue(
178
IONotificationPortRef notify, dispatch_queue_t queue )
179
__OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_4_3);
180
181
/*! @function IODispatchCalloutFromMessage
182
@abstract Dispatches callback notifications from a mach message.
183
@discussion A notification object may deliver notifications to a mach messaging client,
184
which should call this function to generate the callbacks associated with the notifications arriving on the port.
185
@param unused Not used, set to zero.
186
@param msg A pointer to the message received.
187
@param reference Pass the IONotificationPortRef for the object. */
188
189
void
190
IODispatchCalloutFromMessage(
191
void *unused,
192
mach_msg_header_t *msg,
193
void *reference );
194
195
/*! @function IOCreateReceivePort
196
@abstract Creates and returns a mach port suitable for receiving IOKit messages of the specified type.
197
@discussion In the future IOKit may use specialized messages and ports
198
instead of the standard ports created by mach_port_allocate(). Use this
199
function instead of mach_port_allocate() to ensure compatibility with future
200
revisions of IOKit.
201
@param msgType Type of message to be sent to this port
202
(kOSNotificationMessageID or kOSAsyncCompleteMessageID)
203
@param recvPort The created port is returned.
204
@result A kern_return_t error code. */
205
206
kern_return_t
207
IOCreateReceivePort( uint32_t msgType, mach_port_t * recvPort );
208
209
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
210
211
/*
212
* IOObject
213
*/
214
215
/*! @function IOObjectRelease
216
@abstract Releases an object handle previously returned by IOKitLib.
217
@discussion All objects returned by IOKitLib should be released with this function when access to them is no longer needed. Using the object after it has been released may or may not return an error, depending on how many references the task has to the same object in the kernel.
218
@param object The IOKit object to release.
219
@result A kern_return_t error code. */
220
221
kern_return_t
222
IOObjectRelease(
223
io_object_t object );
224
225
/*! @function IOObjectRetain
226
@abstract Retains an object handle previously returned by IOKitLib.
227
@discussion Gives the caller an additional reference to an existing object handle previously returned by IOKitLib.
228
@param object The IOKit object to retain.
229
@result A kern_return_t error code. */
230
231
kern_return_t
232
IOObjectRetain(
233
io_object_t object );
234
235
/*! @function IOObjectGetClass
236
@abstract Return the class name of an IOKit object.
237
@discussion This function uses the OSMetaClass system in the kernel to derive the name of the class the object is an instance of.
238
@param object The IOKit object.
239
@param className Caller allocated buffer to receive the name string.
240
@result A kern_return_t error code. */
241
242
kern_return_t
243
IOObjectGetClass(
244
io_object_t object,
245
io_name_t className );
246
247
/*! @function IOObjectCopyClass
248
@abstract Return the class name of an IOKit object.
249
@discussion This function does the same thing as IOObjectGetClass, but returns the result as a CFStringRef.
250
@param object The IOKit object.
251
@result The resulting CFStringRef. This should be released by the caller. If a valid object is not passed in, then NULL is returned.*/
252
253
CFStringRef
254
IOObjectCopyClass(io_object_t object)
255
AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
256
257
/*! @function IOObjectCopySuperclassForClass
258
@abstract Return the superclass name of the given class.
259
@discussion This function uses the OSMetaClass system in the kernel to derive the name of the superclass of the class.
260
@param classname The name of the class as a CFString.
261
@result The resulting CFStringRef. This should be released by the caller. If there is no superclass, or a valid class name is not passed in, then NULL is returned.*/
262
263
CFStringRef
264
IOObjectCopySuperclassForClass(CFStringRef classname)
265
AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
266
267
/*! @function IOObjectCopyBundleIdentifierForClass
268
@abstract Return the bundle identifier of the given class.
269
@discussion This function uses the OSMetaClass system in the kernel to derive the name of the kmod, which is the same as the bundle identifier.
270
@param classname The name of the class as a CFString.
271
@result The resulting CFStringRef. This should be released by the caller. If a valid class name is not passed in, then NULL is returned.*/
272
273
CFStringRef
274
IOObjectCopyBundleIdentifierForClass(CFStringRef classname)
275
AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
276
277
/*! @function IOObjectConformsTo
278
@abstract Performs an OSDynamicCast operation on an IOKit object.
279
@discussion This function uses the OSMetaClass system in the kernel to determine if the object will dynamic cast to a class, specified as a C-string. In other words, if the object is of that class or a subclass.
280
@param object An IOKit object.
281
@param className The name of the class, as a C-string.
282
@result If the object handle is valid, and represents an object in the kernel that dynamic casts to the class true is returned, otherwise false. */
283
284
boolean_t
285
IOObjectConformsTo(
286
io_object_t object,
287
const io_name_t className );
288
289
/*! @function IOObjectIsEqualTo
290
@abstract Checks two object handles to see if they represent the same kernel object.
291
@discussion If two object handles are returned by IOKitLib functions, this function will compare them to see if they represent the same kernel object.
292
@param object An IOKit object.
293
@param anObject Another IOKit object.
294
@result If both object handles are valid, and represent the same object in the kernel true is returned, otherwise false. */
295
296
boolean_t
297
IOObjectIsEqualTo(
298
io_object_t object,
299
io_object_t anObject );
300
301
/*! @function IOObjectGetKernelRetainCount
302
@abstract Returns kernel retain count of an IOKit object.
303
@discussion This function may be used in diagnostics to determine the current retain count of the kernel object at the kernel level.
304
@param object An IOKit object.
305
@result If the object handle is valid, the kernel objects retain count is returned, otherwise zero is returned. */
306
307
uint32_t
308
IOObjectGetKernelRetainCount(
309
io_object_t object )
310
AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
311
312
/*! @function IOObjectGetUserRetainCount
313
@abstract Returns the retain count for the current process of an IOKit object.
314
@discussion This function may be used in diagnostics to determine the current retain count for the calling process of the kernel object.
315
@param object An IOKit object.
316
@result If the object handle is valid, the objects user retain count is returned, otherwise zero is returned. */
317
318
uint32_t
319
IOObjectGetUserRetainCount(
320
io_object_t object )
321
AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER;
322
323
/*! @function IOObjectGetRetainCount
324
@abstract Returns kernel retain count of an IOKit object. Identical to IOObjectGetKernelRetainCount() but available prior to Mac OS 10.6.
325
@discussion This function may be used in diagnostics to determine the current retain count of the kernel object at the kernel level.
326
@param object An IOKit object.
327
@result If the object handle is valid, the kernel objects retain count is returned, otherwise zero is returned. */
328
329
uint32_t
330
IOObjectGetRetainCount(
331
io_object_t object );
332
333
334
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
335
336
/*
337
* IOIterator, subclass of IOObject
338
*/
339
340
/*! @function IOIteratorNext
341
@abstract Returns the next object in an iteration.
342
@discussion This function returns the next object in an iteration, or zero if no more remain or the iterator is invalid.
343
@param iterator An IOKit iterator handle.
344
@result If the iterator handle is valid, the next element in the iteration is returned, otherwise zero is returned. The element should be released by the caller when it is finished. */
345
346
io_object_t
347
IOIteratorNext(
348
io_iterator_t iterator );
349
350
/*! @function IOIteratorReset
351
@abstract Resets an iteration back to the beginning.
352
@discussion If an iterator is invalid, or if the caller wants to start over, IOIteratorReset will set the iteration back to the beginning.
353
@param iterator An IOKit iterator handle. */
354
355
void
356
IOIteratorReset(
357
io_iterator_t iterator );
358
359
/*! @function IOIteratorIsValid
360
@abstract Checks an iterator is still valid.
361
@discussion Some iterators will be made invalid if changes are made to the structure they are iterating over. This function checks the iterator is still valid and should be called when IOIteratorNext returns zero. An invalid iterator can be reset and the iteration restarted.
362
@param iterator An IOKit iterator handle.
363
@result True if the iterator handle is valid, otherwise false is returned. */
364
365
boolean_t
366
IOIteratorIsValid(
367
io_iterator_t iterator );
368
369
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
370
371
/*
372
* IOService, subclass of IORegistryEntry
373
*/
374
375
/*!
376
@function IOServiceGetMatchingService
377
@abstract Look up a registered IOService object that matches a matching dictionary.
378
@discussion This is the preferred method of finding IOService objects currently registered by IOKit (that is, objects that have had their registerService() methods invoked). To find IOService objects that aren't yet registered, use an iterator as created by IORegistryEntryCreateIterator(). IOServiceAddMatchingNotification can also supply this information and install a notification of new IOServices. The matching information used in the matching dictionary may vary depending on the class of service being looked up.
379
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
380
@param matching A CF dictionary containing matching information, of which one reference is always consumed by this function (Note prior to the Tiger release there was a small chance that the dictionary might not be released if there was an error attempting to serialize the dictionary). IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching, IOServiceNameMatching, IOBSDNameMatching.
381
@result The first service matched is returned on success. The service must be released by the caller.
382
*/
383
384
io_service_t
385
IOServiceGetMatchingService(
386
mach_port_t masterPort,
387
CFDictionaryRef matching CF_RELEASES_ARGUMENT);
388
389
/*! @function IOServiceGetMatchingServices
390
@abstract Look up registered IOService objects that match a matching dictionary.
391
@discussion This is the preferred method of finding IOService objects currently registered by IOKit (that is, objects that have had their registerService() methods invoked). To find IOService objects that aren't yet registered, use an iterator as created by IORegistryEntryCreateIterator(). IOServiceAddMatchingNotification can also supply this information and install a notification of new IOServices. The matching information used in the matching dictionary may vary depending on the class of service being looked up.
392
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
393
@param matching A CF dictionary containing matching information, of which one reference is always consumed by this function (Note prior to the Tiger release there was a small chance that the dictionary might not be released if there was an error attempting to serialize the dictionary). IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching, IOServiceNameMatching, IOBSDNameMatching.
394
@param existing An iterator handle is returned on success, and should be released by the caller when the iteration is finished.
395
@result A kern_return_t error code. */
396
397
kern_return_t
398
IOServiceGetMatchingServices(
399
mach_port_t masterPort,
400
CFDictionaryRef matching CF_RELEASES_ARGUMENT,
401
io_iterator_t * existing );
402
403
404
kern_return_t
405
IOServiceAddNotification(
406
mach_port_t masterPort,
407
const io_name_t notificationType,
408
CFDictionaryRef matching,
409
mach_port_t wakePort,
410
uintptr_t reference,
411
io_iterator_t * notification ) DEPRECATED_ATTRIBUTE;
412
413
/*! @function IOServiceAddMatchingNotification
414
@abstract Look up registered IOService objects that match a matching dictionary, and install a notification request of new IOServices that match.
415
@discussion This is the preferred method of finding IOService objects that may arrive at any time. The type of notification specifies the state change the caller is interested in, on IOService's that match the match dictionary. Notification types are identified by name, and are defined in IOKitKeys.h. The matching information used in the matching dictionary may vary depending on the class of service being looked up.
416
@param notifyPort A IONotificationPortRef object that controls how messages will be sent when the armed notification is fired. When the notification is delivered, the io_iterator_t representing the notification should be iterated through to pick up all outstanding objects. When the iteration is finished the notification is rearmed. See IONotificationPortCreate.
417
@param notificationType A notification type from IOKitKeys.h
418
<br> kIOPublishNotification Delivered when an IOService is registered.
419
<br> kIOFirstPublishNotification Delivered when an IOService is registered, but only once per IOService instance. Some IOService's may be reregistered when their state is changed.
420
<br> kIOMatchedNotification Delivered when an IOService has had all matching drivers in the kernel probed and started.
421
<br> kIOFirstMatchNotification Delivered when an IOService has had all matching drivers in the kernel probed and started, but only once per IOService instance. Some IOService's may be reregistered when their state is changed.
422
<br> kIOTerminatedNotification Delivered after an IOService has been terminated.
423
@param matching A CF dictionary containing matching information, of which one reference is always consumed by this function (Note prior to the Tiger release there was a small chance that the dictionary might not be released if there was an error attempting to serialize the dictionary). IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching, IOServiceNameMatching, IOBSDNameMatching.
424
@param callback A callback function called when the notification fires.
425
@param refCon A reference constant for the callbacks use.
426
@param notification An iterator handle is returned on success, and should be released by the caller when the notification is to be destroyed. The notification is armed when the iterator is emptied by calls to IOIteratorNext - when no more objects are returned, the notification is armed. Note the notification is not armed when first created.
427
@result A kern_return_t error code. */
428
429
kern_return_t
430
IOServiceAddMatchingNotification(
431
IONotificationPortRef notifyPort,
432
const io_name_t notificationType,
433
CFDictionaryRef matching CF_RELEASES_ARGUMENT,
434
IOServiceMatchingCallback callback,
435
void * refCon,
436
io_iterator_t * notification );
437
438
/*! @function IOServiceAddInterestNotification
439
@abstract Register for notification of state changes in an IOService.
440
@discussion IOService objects deliver notifications of their state changes to their clients via the IOService::messageClients API, and to other interested parties including callers of this function. Message types are defined IOKit/IOMessage.h.
441
@param notifyPort A IONotificationPortRef object that controls how messages will be sent when the notification is fired. See IONotificationPortCreate.
442
@param interestType A notification type from IOKitKeys.h
443
<br> kIOGeneralInterest General state changes delivered via the IOService::messageClients API.
444
<br> kIOBusyInterest Delivered when the IOService changes its busy state to or from zero. The message argument contains the new busy state causing the notification.
445
@param callback A callback function called when the notification fires, with messageType and messageArgument for the state change.
446
@param refCon A reference constant for the callbacks use.
447
@param notification An object handle is returned on success, and should be released by the caller when the notification is to be destroyed.
448
@result A kern_return_t error code. */
449
450
kern_return_t
451
IOServiceAddInterestNotification(
452
IONotificationPortRef notifyPort,
453
io_service_t service,
454
const io_name_t interestType,
455
IOServiceInterestCallback callback,
456
void * refCon,
457
io_object_t * notification );
458
459
/*! @function IOServiceMatchPropertyTable
460
@abstract Match an IOService objects with matching dictionary.
461
@discussion This function calls the matching method of an IOService object and returns the boolean result.
462
@param service The IOService object to match.
463
@param matching A CF dictionary containing matching information. IOKitLib can construct matching dictionaries for common criteria with helper functions such as IOServiceMatching, IOServiceNameMatching, IOBSDNameMatching.
464
@param matches The boolean result is returned.
465
@result A kern_return_t error code. */
466
467
kern_return_t
468
IOServiceMatchPropertyTable(
469
io_service_t service,
470
CFDictionaryRef matching,
471
boolean_t * matches );
472
473
/*! @function IOServiceGetBusyState
474
@abstract Returns the busyState of an IOService.
475
@discussion Many activities in IOService are asynchronous. When registration, matching, or termination is in progress on an IOService, its busyState is increased by one. Change in busyState to or from zero also changes the IOService's provider's busyState by one, which means that an IOService is marked busy when any of the above activities is ocurring on it or any of its clients.
476
@param service The IOService whose busyState to return.
477
@param busyState The busyState count is returned.
478
@result A kern_return_t error code. */
479
480
kern_return_t
481
IOServiceGetBusyState(
482
io_service_t service,
483
uint32_t * busyState );
484
485
/*! @function IOServiceWaitQuiet
486
@abstract Wait for an IOService's busyState to be zero.
487
@discussion Blocks the caller until an IOService is non busy, see IOServiceGetBusyState.
488
@param service The IOService wait on.
489
@param waitTime Specifies a maximum time to wait.
490
@result Returns an error code if mach synchronization primitives fail, kIOReturnTimeout, or kIOReturnSuccess. */
491
492
kern_return_t
493
IOServiceWaitQuiet(
494
io_service_t service,
495
mach_timespec_t * waitTime );
496
497
/*! @function IOKitGetBusyState
498
@abstract Returns the busyState of all IOServices.
499
@discussion Many activities in IOService are asynchronous. When registration, matching, or termination is in progress on an IOService, its busyState is increased by one. Change in busyState to or from zero also changes the IOService's provider's busyState by one, which means that an IOService is marked busy when any of the above activities is ocurring on it or any of its clients. IOKitGetBusyState returns the busy state of the root of the service plane which reflects the busy state of all IOServices.
500
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
501
@param busyState The busyState count is returned.
502
@result A kern_return_t error code. */
503
504
kern_return_t
505
IOKitGetBusyState(
506
mach_port_t masterPort,
507
uint32_t * busyState );
508
509
/*! @function IOKitWaitQuiet
510
@abstract Wait for a all IOServices' busyState to be zero.
511
@discussion Blocks the caller until all IOServices are non busy, see IOKitGetBusyState.
512
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
513
@param waitTime Specifies a maximum time to wait.
514
@result Returns an error code if mach synchronization primitives fail, kIOReturnTimeout, or kIOReturnSuccess. */
515
516
kern_return_t
517
IOKitWaitQuiet(
518
mach_port_t masterPort,
519
mach_timespec_t * waitTime );
520
521
/*! @function IOServiceOpen
522
@abstract A request to create a connection to an IOService.
523
@discussion A non kernel client may request a connection be opened via the IOServiceOpen() library function, which will call IOService::newUserClient in the kernel. The rules & capabilities of user level clients are family dependent, the default IOService implementation returns kIOReturnUnsupported.
524
@param service The IOService object to open a connection to, usually obtained via the IOServiceGetMatchingServices or IOServiceAddNotification APIs.
525
@param owningTask The mach task requesting the connection.
526
@param type A constant specifying the type of connection to be created, interpreted only by the IOService's family.
527
@param connect An io_connect_t handle is returned on success, to be used with the IOConnectXXX APIs. It should be destroyed with IOServiceClose().
528
@result A return code generated by IOService::newUserClient. */
529
530
kern_return_t
531
IOServiceOpen(
532
io_service_t service,
533
task_port_t owningTask,
534
uint32_t type,
535
io_connect_t * connect );
536
537
/*! @function IOServiceRequestProbe
538
@abstract A request to rescan a bus for device changes.
539
@discussion A non kernel client may request a bus or controller rescan for added or removed devices, if the bus family does automatically notice such changes. For example, SCSI bus controllers do not notice device changes. The implementation of this routine is family dependent, and the default IOService implementation returns kIOReturnUnsupported.
540
@param service The IOService object to request a rescan, usually obtained via the IOServiceGetMatchingServices or IOServiceAddNotification APIs.
541
@param options An options mask, interpreted only by the IOService's family.
542
@result A return code generated by IOService::requestProbe. */
543
544
kern_return_t
545
IOServiceRequestProbe(
546
io_service_t service,
547
uint32_t options );
548
549
// options for IOServiceAuthorize()
550
enum {
551
kIOServiceInteractionAllowed = 0x00000001
552
};
553
554
/*! @function IOServiceAuthorize
555
@abstract Authorize access to an IOService.
556
@discussion Determine whether this application is authorized to invoke IOServiceOpen() for a given IOService, either by confirming that it has been previously authorized by the user, or by soliciting the console user.
557
@param service The IOService object to be authorized, usually obtained via the IOServiceGetMatchingServices or IOServiceAddNotification APIs.
558
@param options kIOServiceInteractionAllowed may be set to permit user interaction, if required.
559
@result kIOReturnSuccess if the IOService is authorized, kIOReturnNotPermitted if the IOService is not authorized. */
560
561
kern_return_t
562
IOServiceAuthorize(
563
io_service_t service,
564
uint32_t options );
565
566
int
567
IOServiceOpenAsFileDescriptor(
568
io_service_t service,
569
int oflag );
570
571
/* * * * * * * * * * * * * * *ff * * * * * * * * * * * * * * * * * * * * * * */
572
573
/*
574
* IOService connection
575
*/
576
577
/*! @function IOServiceClose
578
@abstract Close a connection to an IOService and destroy the connect handle.
579
@discussion A connection created with the IOServiceOpen should be closed when the connection is no longer to be used with IOServiceClose.
580
@param connect The connect handle created by IOServiceOpen. It will be destroyed by this function, and should not be released with IOObjectRelease.
581
@result A kern_return_t error code. */
582
583
kern_return_t
584
IOServiceClose(
585
io_connect_t connect );
586
587
/*! @function IOConnectAddRef
588
@abstract Adds a reference to the connect handle.
589
@discussion Adds a reference to the connect handle.
590
@param connect The connect handle created by IOServiceOpen.
591
@result A kern_return_t error code. */
592
593
kern_return_t
594
IOConnectAddRef(
595
io_connect_t connect );
596
597
/*! @function IOConnectRelease
598
@abstract Remove a reference to the connect handle.
599
@discussion Removes a reference to the connect handle. If the last reference is removed an implicit IOServiceClose is performed.
600
@param connect The connect handle created by IOServiceOpen.
601
@result A kern_return_t error code. */
602
603
kern_return_t
604
IOConnectRelease(
605
io_connect_t connect );
606
607
/*! @function IOConnectGetService
608
@abstract Returns the IOService a connect handle was opened on.
609
@discussion Finds the service object a connection was opened on.
610
@param connect The connect handle created by IOServiceOpen.
611
@param service On succes, the service handle the connection was opened on, which should be released with IOObjectRelease.
612
@result A kern_return_t error code. */
613
614
kern_return_t
615
IOConnectGetService(
616
io_connect_t connect,
617
io_service_t * service );
618
619
/*! @function IOConnectSetNotificationPort
620
@abstract Set a port to receive family specific notifications.
621
@discussion This is a generic method to pass a mach port send right to be be used by family specific notifications.
622
@param connect The connect handle created by IOServiceOpen.
623
@param type The type of notification requested, not interpreted by IOKit and family defined.
624
@param port The port to which to send notifications.
625
@param reference Some families may support passing a reference parameter for the callers use with the notification.
626
@result A kern_return_t error code. */
627
628
kern_return_t
629
IOConnectSetNotificationPort(
630
io_connect_t connect,
631
uint32_t type,
632
mach_port_t port,
633
uintptr_t reference );
634
635
/*! @function IOConnectMapMemory
636
@abstract Map hardware or shared memory into the caller's task.
637
@discussion This is a generic method to create a mapping in the callers task. The family will interpret the type parameter to determine what sort of mapping is being requested. Cache modes and placed mappings may be requested by the caller.
638
@param connect The connect handle created by IOServiceOpen.
639
@param memoryType What is being requested to be mapped, not interpreted by IOKit and family defined. The family may support physical hardware or shared memory mappings.
640
@param intoTask The task port for the task in which to create the mapping. This may be different to the task which the opened the connection.
641
@param atAddress An in/out parameter - if the kIOMapAnywhere option is not set, the caller should pass the address where it requests the mapping be created, otherwise nothing need to set on input. The address of the mapping created is passed back on sucess.
642
@param ofSize The size of the mapping created is passed back on success.
643
@result A kern_return_t error code. */
644
645
#if !__LP64__ || defined(IOCONNECT_MAPMEMORY_10_6)
646
647
kern_return_t
648
IOConnectMapMemory(
649
io_connect_t connect,
650
uint32_t memoryType,
651
task_port_t intoTask,
652
vm_address_t *atAddress,
653
vm_size_t *ofSize,
654
IOOptionBits options );
655
656
#else
657
658
kern_return_t
659
IOConnectMapMemory(
660
io_connect_t connect,
661
uint32_t memoryType,
662
task_port_t intoTask,
663
mach_vm_address_t *atAddress,
664
mach_vm_size_t *ofSize,
665
IOOptionBits options );
666
667
#endif /* !__LP64__ || defined(IOCONNECT_MAPMEMORY_10_6) */
668
669
670
/*! @function IOConnectMapMemory64
671
@abstract Map hardware or shared memory into the caller's task.
672
@discussion This is a generic method to create a mapping in the callers task. The family will interpret the type parameter to determine what sort of mapping is being requested. Cache modes and placed mappings may be requested by the caller.
673
@param connect The connect handle created by IOServiceOpen.
674
@param memoryType What is being requested to be mapped, not interpreted by IOKit and family defined. The family may support physical hardware or shared memory mappings.
675
@param intoTask The task port for the task in which to create the mapping. This may be different to the task which the opened the connection.
676
@param atAddress An in/out parameter - if the kIOMapAnywhere option is not set, the caller should pass the address where it requests the mapping be created, otherwise nothing need to set on input. The address of the mapping created is passed back on sucess.
677
@param ofSize The size of the mapping created is passed back on success.
678
@result A kern_return_t error code. */
679
680
kern_return_t IOConnectMapMemory64(
681
io_connect_t connect,
682
uint32_t memoryType,
683
task_port_t intoTask,
684
mach_vm_address_t *atAddress,
685
mach_vm_size_t *ofSize,
686
IOOptionBits options );
687
688
/*! @function IOConnectUnmapMemory
689
@abstract Remove a mapping made with IOConnectMapMemory.
690
@discussion This is a generic method to remove a mapping in the callers task.
691
@param connect The connect handle created by IOServiceOpen.
692
@param memoryType The memory type originally requested in IOConnectMapMemory.
693
@param fromTask The task port for the task in which to remove the mapping. This may be different to the task which the opened the connection.
694
@param atAddress The address of the mapping to be removed.
695
@result A kern_return_t error code. */
696
697
#if !__LP64__ || defined(IOCONNECT_MAPMEMORY_10_6)
698
699
kern_return_t
700
IOConnectUnmapMemory(
701
io_connect_t connect,
702
uint32_t memoryType,
703
task_port_t fromTask,
704
vm_address_t atAddress );
705
706
#else
707
708
kern_return_t
709
IOConnectUnmapMemory(
710
io_connect_t connect,
711
uint32_t memoryType,
712
task_port_t fromTask,
713
mach_vm_address_t atAddress );
714
715
716
#endif /* !__LP64__ || defined(IOCONNECT_MAPMEMORY_10_6) */
717
718
/*! @function IOConnectUnmapMemory64
719
@abstract Remove a mapping made with IOConnectMapMemory64.
720
@discussion This is a generic method to remove a mapping in the callers task.
721
@param connect The connect handle created by IOServiceOpen.
722
@param memoryType The memory type originally requested in IOConnectMapMemory.
723
@param fromTask The task port for the task in which to remove the mapping. This may be different to the task which the opened the connection.
724
@param atAddress The address of the mapping to be removed.
725
@result A kern_return_t error code. */
726
727
kern_return_t IOConnectUnmapMemory64(
728
io_connect_t connect,
729
uint32_t memoryType,
730
task_port_t fromTask,
731
mach_vm_address_t atAddress );
732
733
734
/*! @function IOConnectSetCFProperties
735
@abstract Set CF container based properties on a connection.
736
@discussion This is a generic method to pass a CF container of properties to the connection. The properties are interpreted by the family and commonly represent configuration settings, but may be interpreted as anything.
737
@param connect The connect handle created by IOServiceOpen.
738
@param properties A CF container - commonly a CFDictionary but this is not enforced. The container should consist of objects which are understood by IOKit - these are currently : CFDictionary, CFArray, CFSet, CFString, CFData, CFNumber, CFBoolean, and are passed in the kernel as the corresponding OSDictionary etc. objects.
739
@result A kern_return_t error code returned by the family. */
740
741
kern_return_t
742
IOConnectSetCFProperties(
743
io_connect_t connect,
744
CFTypeRef properties );
745
746
/*! @function IOConnectSetCFProperty
747
@abstract Set a CF container based property on a connection.
748
@discussion This is a generic method to pass a CF property to the connection. The property is interpreted by the family and commonly represent configuration settings, but may be interpreted as anything.
749
@param connect The connect handle created by IOServiceOpen.
750
@param propertyName The name of the property as a CFString.
751
@param property A CF container - should consist of objects which are understood by IOKit - these are currently : CFDictionary, CFArray, CFSet, CFString, CFData, CFNumber, CFBoolean, and are passed in the kernel as the corresponding OSDictionary etc. objects.
752
@result A kern_return_t error code returned by the object. */
753
754
kern_return_t
755
IOConnectSetCFProperty(
756
io_connect_t connect,
757
CFStringRef propertyName,
758
CFTypeRef property );
759
760
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
761
762
// Combined LP64 & ILP32 Extended IOUserClient::externalMethod
763
764
kern_return_t
765
IOConnectCallMethod(
766
mach_port_t connection, // In
767
uint32_t selector, // In
768
const uint64_t *input, // In
769
uint32_t inputCnt, // In
770
const void *inputStruct, // In
771
size_t inputStructCnt, // In
772
uint64_t *output, // Out
773
uint32_t *outputCnt, // In/Out
774
void *outputStruct, // Out
775
size_t *outputStructCnt) // In/Out
776
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
777
778
kern_return_t
779
IOConnectCallAsyncMethod(
780
mach_port_t connection, // In
781
uint32_t selector, // In
782
mach_port_t wake_port, // In
783
uint64_t *reference, // In
784
uint32_t referenceCnt, // In
785
const uint64_t *input, // In
786
uint32_t inputCnt, // In
787
const void *inputStruct, // In
788
size_t inputStructCnt, // In
789
uint64_t *output, // Out
790
uint32_t *outputCnt, // In/Out
791
void *outputStruct, // Out
792
size_t *outputStructCnt) // In/Out
793
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
794
795
kern_return_t
796
IOConnectCallStructMethod(
797
mach_port_t connection, // In
798
uint32_t selector, // In
799
const void *inputStruct, // In
800
size_t inputStructCnt, // In
801
void *outputStruct, // Out
802
size_t *outputStructCnt) // In/Out
803
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
804
805
kern_return_t
806
IOConnectCallAsyncStructMethod(
807
mach_port_t connection, // In
808
uint32_t selector, // In
809
mach_port_t wake_port, // In
810
uint64_t *reference, // In
811
uint32_t referenceCnt, // In
812
const void *inputStruct, // In
813
size_t inputStructCnt, // In
814
void *outputStruct, // Out
815
size_t *outputStructCnt) // In/Out
816
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
817
818
kern_return_t
819
IOConnectCallScalarMethod(
820
mach_port_t connection, // In
821
uint32_t selector, // In
822
const uint64_t *input, // In
823
uint32_t inputCnt, // In
824
uint64_t *output, // Out
825
uint32_t *outputCnt) // In/Out
826
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
827
828
kern_return_t
829
IOConnectCallAsyncScalarMethod(
830
mach_port_t connection, // In
831
uint32_t selector, // In
832
mach_port_t wake_port, // In
833
uint64_t *reference, // In
834
uint32_t referenceCnt, // In
835
const uint64_t *input, // In
836
uint32_t inputCnt, // In
837
uint64_t *output, // Out
838
uint32_t *outputCnt) // In/Out
839
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
840
841
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
842
843
kern_return_t
844
IOConnectTrap0(io_connect_t connect,
845
uint32_t index );
846
847
kern_return_t
848
IOConnectTrap1(io_connect_t connect,
849
uint32_t index,
850
uintptr_t p1 );
851
852
kern_return_t
853
IOConnectTrap2(io_connect_t connect,
854
uint32_t index,
855
uintptr_t p1,
856
uintptr_t p2);
857
858
kern_return_t
859
IOConnectTrap3(io_connect_t connect,
860
uint32_t index,
861
uintptr_t p1,
862
uintptr_t p2,
863
uintptr_t p3);
864
865
kern_return_t
866
IOConnectTrap4(io_connect_t connect,
867
uint32_t index,
868
uintptr_t p1,
869
uintptr_t p2,
870
uintptr_t p3,
871
uintptr_t p4);
872
873
kern_return_t
874
IOConnectTrap5(io_connect_t connect,
875
uint32_t index,
876
uintptr_t p1,
877
uintptr_t p2,
878
uintptr_t p3,
879
uintptr_t p4,
880
uintptr_t p5);
881
882
kern_return_t
883
IOConnectTrap6(io_connect_t connect,
884
uint32_t index,
885
uintptr_t p1,
886
uintptr_t p2,
887
uintptr_t p3,
888
uintptr_t p4,
889
uintptr_t p5,
890
uintptr_t p6);
891
892
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
893
894
/*! @function IOConnectAddClient
895
@abstract Inform a connection of a second connection.
896
@discussion This is a generic method to inform a family connection of a second connection, and is rarely used.
897
@param connect The connect handle created by IOServiceOpen.
898
@param client Another connect handle created by IOServiceOpen.
899
@result A kern_return_t error code returned by the family. */
900
901
kern_return_t
902
IOConnectAddClient(
903
io_connect_t connect,
904
io_connect_t client );
905
906
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
907
908
/*
909
* IORegistry accessors
910
*/
911
912
/*! @function IORegistryGetRootEntry
913
@abstract Return a handle to the registry root.
914
@discussion This method provides an accessor to the root of the registry for the machine. The root may be passed to a registry iterator when iterating a plane, and contains properties that describe the available planes, and diagnostic information for IOKit.
915
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
916
@result A handle to the IORegistryEntry root instance, to be released with IOObjectRelease by the caller, or MACH_PORT_NULL on failure. */
917
918
io_registry_entry_t
919
IORegistryGetRootEntry(
920
mach_port_t masterPort );
921
922
/*! @function IORegistryEntryFromPath
923
@abstract Looks up a registry entry by path.
924
@discussion This function parses paths to lookup registry entries. The path should begin with '<plane name>:' If there are characters remaining unparsed after an entry has been looked up, this is considered an invalid lookup. Paths are further documented in IORegistryEntry.h
925
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
926
@param path A C-string path.
927
@result A handle to the IORegistryEntry witch was found with the path, to be released with IOObjectRelease by the caller, or MACH_PORT_NULL on failure. */
928
929
io_registry_entry_t
930
IORegistryEntryFromPath(
931
mach_port_t masterPort,
932
const io_string_t path );
933
934
935
/*! @function IORegistryEntryFromPathCFString
936
@abstract Looks up a registry entry by path.
937
@discussion This function parses paths to lookup registry entries. The path should begin with '<plane name>:' If there are characters remaining unparsed after an entry has been looked up, this is considered an invalid lookup. Paths are further documented in IORegistryEntry.h
938
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
939
@param path A CFString path.
940
@result A handle to the IORegistryEntry witch was found with the path, to be released with IOObjectRelease by the caller, or MACH_PORT_NULL on failure. */
941
942
io_registry_entry_t
943
IORegistryEntryCopyFromPath(
944
mach_port_t masterPort,
945
CFStringRef path )
946
#if defined(__MAC_10_11)
947
__OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0)
948
#endif
949
;
950
951
// options for IORegistryCreateIterator(), IORegistryEntryCreateIterator, IORegistryEntrySearchCFProperty()
952
enum {
953
kIORegistryIterateRecursively = 0x00000001,
954
kIORegistryIterateParents = 0x00000002
955
};
956
957
/*! @function IORegistryCreateIterator
958
@abstract Create an iterator rooted at the registry root.
959
@discussion This method creates an IORegistryIterator in the kernel that is set up with options to iterate children of the registry root entry, and to recurse automatically into entries as they are returned, or only when instructed with calls to IORegistryIteratorEnterEntry. The iterator object keeps track of entries that have been recursed into previously to avoid loops.
960
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
961
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
962
@param options kIORegistryIterateRecursively may be set to recurse automatically into each entry as it is returned from IOIteratorNext calls on the registry iterator.
963
@param iterator A created iterator handle, to be released by the caller when it has finished with it.
964
@result A kern_return_t error code. */
965
966
kern_return_t
967
IORegistryCreateIterator(
968
mach_port_t masterPort,
969
const io_name_t plane,
970
IOOptionBits options,
971
io_iterator_t * iterator );
972
973
/*! @function IORegistryEntryCreateIterator
974
@abstract Create an iterator rooted at a given registry entry.
975
@discussion This method creates an IORegistryIterator in the kernel that is set up with options to iterate children or parents of a root entry, and to recurse automatically into entries as they are returned, or only when instructed with calls to IORegistryIteratorEnterEntry. The iterator object keeps track of entries that have been recursed into previously to avoid loops.
976
@param entry The root entry to begin the iteration at.
977
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
978
@param options kIORegistryIterateRecursively may be set to recurse automatically into each entry as it is returned from IOIteratorNext calls on the registry iterator. kIORegistryIterateParents may be set to iterate the parents of each entry, by default the children are iterated.
979
@param iterator A created iterator handle, to be released by the caller when it has finished with it.
980
@result A kern_return_t error code. */
981
982
kern_return_t
983
IORegistryEntryCreateIterator(
984
io_registry_entry_t entry,
985
const io_name_t plane,
986
IOOptionBits options,
987
io_iterator_t * iterator );
988
989
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
990
991
/*
992
* IORegistryIterator, subclass of IOIterator
993
*/
994
995
/*! @function IORegistryIteratorEnterEntry
996
@abstract Recurse into the current entry in the registry iteration.
997
@discussion This method makes the current entry, ie. the last entry returned by IOIteratorNext, the root in a new level of recursion.
998
@result A kern_return_t error code. */
999
1000
kern_return_t
1001
IORegistryIteratorEnterEntry(
1002
io_iterator_t iterator );
1003
1004
/*! @function IORegistryIteratorExitEntry
1005
@abstract Exits a level of recursion, restoring the current entry.
1006
@discussion This method undoes an IORegistryIteratorEnterEntry, restoring the current entry. If there are no more levels of recursion to exit false is returned, otherwise true is returned.
1007
@result kIOReturnSuccess if a level of recursion was undone, kIOReturnNoDevice if no recursive levels are left in the iteration. */
1008
1009
kern_return_t
1010
IORegistryIteratorExitEntry(
1011
io_iterator_t iterator );
1012
1013
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1014
1015
/*
1016
* IORegistryEntry, subclass of IOObject
1017
*/
1018
1019
/*! @function IORegistryEntryGetName
1020
@abstract Returns a C-string name assigned to a registry entry.
1021
@discussion Registry entries can be named in a particular plane, or globally. This function returns the entry's global name. The global name defaults to the entry's meta class name if it has not been named.
1022
@param entry The registry entry handle whose name to look up.
1023
@param name The caller's buffer to receive the name.
1024
@result A kern_return_t error code. */
1025
1026
kern_return_t
1027
IORegistryEntryGetName(
1028
io_registry_entry_t entry,
1029
io_name_t name );
1030
1031
/*! @function IORegistryEntryGetNameInPlane
1032
@abstract Returns a C-string name assigned to a registry entry, in a specified plane.
1033
@discussion Registry entries can be named in a particular plane, or globally. This function returns the entry's name in the specified plane or global name if it has not been named in that plane. The global name defaults to the entry's meta class name if it has not been named.
1034
@param entry The registry entry handle whose name to look up.
1035
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1036
@param name The caller's buffer to receive the name.
1037
@result A kern_return_t error code. */
1038
1039
kern_return_t
1040
IORegistryEntryGetNameInPlane(
1041
io_registry_entry_t entry,
1042
const io_name_t plane,
1043
io_name_t name );
1044
1045
/*! @function IORegistryEntryGetLocationInPlane
1046
@abstract Returns a C-string location assigned to a registry entry, in a specified plane.
1047
@discussion Registry entries can given a location string in a particular plane, or globally. If the entry has had a location set in the specified plane that location string will be returned, otherwise the global location string is returned. If no global location string has been set, an error is returned.
1048
@param entry The registry entry handle whose name to look up.
1049
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1050
@param location The caller's buffer to receive the location string.
1051
@result A kern_return_t error code. */
1052
1053
kern_return_t
1054
IORegistryEntryGetLocationInPlane(
1055
io_registry_entry_t entry,
1056
const io_name_t plane,
1057
io_name_t location );
1058
1059
/*! @function IORegistryEntryGetPath
1060
@abstract Create a path for a registry entry.
1061
@discussion The path for a registry entry is copied to the caller's buffer. The path describes the entry's attachment in a particular plane, which must be specified. The path begins with the plane name followed by a colon, and then followed by '/' separated path components for each of the entries between the root and the registry entry. An alias may also exist for the entry, and will be returned if available.
1062
@param entry The registry entry handle whose path to look up.
1063
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1064
@param path A char buffer allocated by the caller.
1065
@result IORegistryEntryGetPath will fail if the entry is not attached in the plane, or if the buffer is not large enough to contain the path. */
1066
1067
kern_return_t
1068
IORegistryEntryGetPath(
1069
io_registry_entry_t entry,
1070
const io_name_t plane,
1071
io_string_t path );
1072
1073
/*! @function IORegistryEntryCopyPath
1074
@abstract Create a path for a registry entry.
1075
@discussion The path for a registry entry is returned as a CFString The path describes the entry's attachment in a particular plane, which must be specified. The path begins with the plane name followed by a colon, and then followed by '/' separated path components for each of the entries between the root and the registry entry. An alias may also exist for the entry, and will be returned if available.
1076
@param entry The registry entry handle whose path to look up.
1077
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1078
@result An instance of CFString on success, to be released by the caller. IORegistryEntryCopyPath will fail if the entry is not attached in the plane. */
1079
1080
CFStringRef
1081
IORegistryEntryCopyPath(
1082
io_registry_entry_t entry,
1083
const io_name_t plane)
1084
#if defined(__MAC_10_11)
1085
__OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0)
1086
#endif
1087
;
1088
1089
/*! @function IORegistryEntryGetRegistryEntryID
1090
@abstract Returns an ID for the registry entry that is global to all tasks.
1091
@discussion The entry ID returned by IORegistryEntryGetRegistryEntryID can be used to identify a registry entry across all tasks. A registry entry may be looked up by its entryID by creating a matching dictionary with IORegistryEntryIDMatching() to be used with the IOKit matching functions. The ID is valid only until the machine reboots.
1092
@param entry The registry entry handle whose ID to look up.
1093
@param entryID The resulting ID.
1094
@result A kern_return_t error code. */
1095
1096
kern_return_t
1097
IORegistryEntryGetRegistryEntryID(
1098
io_registry_entry_t entry,
1099
uint64_t * entryID );
1100
1101
/*! @function IORegistryEntryCreateCFProperties
1102
@abstract Create a CF dictionary representation of a registry entry's property table.
1103
@discussion This function creates an instantaneous snapshot of a registry entry's property table, creating a CFDictionary analogue in the caller's task. Not every object available in the kernel is represented as a CF container; currently OSDictionary, OSArray, OSSet, OSSymbol, OSString, OSData, OSNumber, OSBoolean are created as their CF counterparts.
1104
@param entry The registry entry handle whose property table to copy.
1105
@param properties A CFDictionary is created and returned the caller on success. The caller should release with CFRelease.
1106
@param allocator The CF allocator to use when creating the CF containers.
1107
@param options No options are currently defined.
1108
@result A kern_return_t error code. */
1109
1110
kern_return_t
1111
IORegistryEntryCreateCFProperties(
1112
io_registry_entry_t entry,
1113
CFMutableDictionaryRef * properties,
1114
CFAllocatorRef allocator,
1115
IOOptionBits options );
1116
1117
/*! @function IORegistryEntryCreateCFProperty
1118
@abstract Create a CF representation of a registry entry's property.
1119
@discussion This function creates an instantaneous snapshot of a registry entry property, creating a CF container analogue in the caller's task. Not every object available in the kernel is represented as a CF container; currently OSDictionary, OSArray, OSSet, OSSymbol, OSString, OSData, OSNumber, OSBoolean are created as their CF counterparts.
1120
@param entry The registry entry handle whose property to copy.
1121
@param key A CFString specifying the property name.
1122
@param allocator The CF allocator to use when creating the CF container.
1123
@param options No options are currently defined.
1124
@result A CF container is created and returned the caller on success. The caller should release with CFRelease. */
1125
1126
CFTypeRef
1127
IORegistryEntryCreateCFProperty(
1128
io_registry_entry_t entry,
1129
CFStringRef key,
1130
CFAllocatorRef allocator,
1131
IOOptionBits options );
1132
1133
/*! @function IORegistryEntrySearchCFProperty
1134
@abstract Create a CF representation of a registry entry's property.
1135
@discussion This function creates an instantaneous snapshot of a registry entry property, creating a CF container analogue in the caller's task. Not every object available in the kernel is represented as a CF container; currently OSDictionary, OSArray, OSSet, OSSymbol, OSString, OSData, OSNumber, OSBoolean are created as their CF counterparts.
1136
This function will search for a property, starting first with specified registry entry's property table, then iterating recusively through either the parent registry entries or the child registry entries of this entry. Once the first occurrence is found, it will lookup and return the value of the property, using the same semantics as IORegistryEntryCreateCFProperty. The iteration keeps track of entries that have been recursed into previously to avoid loops.
1137
@param entry The registry entry at which to start the search.
1138
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1139
@param key A CFString specifying the property name.
1140
@param allocator The CF allocator to use when creating the CF container.
1141
@param options kIORegistryIterateRecursively may be set to recurse automatically into the registry hierarchy. Without this option, this method degenerates into the standard IORegistryEntryCreateCFProperty() call. kIORegistryIterateParents may be set to iterate the parents of the entry, in place of the children.
1142
@result A CF container is created and returned the caller on success. The caller should release with CFRelease. */
1143
1144
CFTypeRef
1145
IORegistryEntrySearchCFProperty(
1146
io_registry_entry_t entry,
1147
const io_name_t plane,
1148
CFStringRef key,
1149
CFAllocatorRef allocator,
1150
IOOptionBits options ) CF_RETURNS_RETAINED;
1151
1152
/* @function IORegistryEntryGetProperty - deprecated,
1153
use IORegistryEntryCreateCFProperty */
1154
1155
kern_return_t
1156
IORegistryEntryGetProperty(
1157
io_registry_entry_t entry,
1158
const io_name_t propertyName,
1159
io_struct_inband_t buffer,
1160
uint32_t * size );
1161
1162
/*! @function IORegistryEntrySetCFProperties
1163
@abstract Set CF container based properties in a registry entry.
1164
@discussion This is a generic method to pass a CF container of properties to an object in the registry. Setting properties in a registry entry is not generally supported, it is more common to support IOConnectSetCFProperties for connection based property setting. The properties are interpreted by the object.
1165
@param entry The registry entry whose properties to set.
1166
@param properties A CF container - commonly a CFDictionary but this is not enforced. The container should consist of objects which are understood by IOKit - these are currently : CFDictionary, CFArray, CFSet, CFString, CFData, CFNumber, CFBoolean, and are passed in the kernel as the corresponding OSDictionary etc. objects.
1167
@result A kern_return_t error code returned by the object. */
1168
1169
kern_return_t
1170
IORegistryEntrySetCFProperties(
1171
io_registry_entry_t entry,
1172
CFTypeRef properties );
1173
1174
/*! @function IORegistryEntrySetCFProperty
1175
@abstract Set a CF container based property in a registry entry.
1176
@discussion This is a generic method to pass a CF container as a property to an object in the registry. Setting properties in a registry entry is not generally supported, it is more common to support IOConnectSetCFProperty for connection based property setting. The property is interpreted by the object.
1177
@param entry The registry entry whose property to set.
1178
@param propertyName The name of the property as a CFString.
1179
@param property A CF container - should consist of objects which are understood by IOKit - these are currently : CFDictionary, CFArray, CFSet, CFString, CFData, CFNumber, CFBoolean, and are passed in the kernel as the corresponding OSDictionary etc. objects.
1180
@result A kern_return_t error code returned by the object. */
1181
1182
kern_return_t
1183
IORegistryEntrySetCFProperty(
1184
io_registry_entry_t entry,
1185
CFStringRef propertyName,
1186
CFTypeRef property );
1187
1188
/*! @function IORegistryEntryGetChildIterator
1189
@abstract Returns an iterator over an registry entry's child entries in a plane.
1190
@discussion This method creates an iterator which will return each of a registry entry's child entries in a specified plane.
1191
@param entry The registry entry whose children to iterate over.
1192
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1193
@param iterator The created iterator over the children of the entry, on success. The iterator must be released when the iteration is finished.
1194
@result A kern_return_t error code. */
1195
1196
kern_return_t
1197
IORegistryEntryGetChildIterator(
1198
io_registry_entry_t entry,
1199
const io_name_t plane,
1200
io_iterator_t * iterator );
1201
1202
/*! @function IORegistryEntryGetChildEntry
1203
@abstract Returns the first child of a registry entry in a plane.
1204
@discussion This function will return the child which first attached to a registry entry in a plane.
1205
@param entry The registry entry whose child to look up.
1206
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1207
@param child The first child of the registry entry, on success. The child must be released by the caller.
1208
@result A kern_return_t error code. */
1209
1210
kern_return_t
1211
IORegistryEntryGetChildEntry(
1212
io_registry_entry_t entry,
1213
const io_name_t plane,
1214
io_registry_entry_t * child );
1215
1216
/*! @function IORegistryEntryGetParentIterator
1217
@abstract Returns an iterator over an registry entry's parent entries in a plane.
1218
@discussion This method creates an iterator which will return each of a registry entry's parent entries in a specified plane.
1219
@param entry The registry entry whose parents to iterate over.
1220
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1221
@param iterator The created iterator over the parents of the entry, on success. The iterator must be released when the iteration is finished.
1222
@result A kern_return_t error. */
1223
1224
kern_return_t
1225
IORegistryEntryGetParentIterator(
1226
io_registry_entry_t entry,
1227
const io_name_t plane,
1228
io_iterator_t * iterator );
1229
1230
/*! @function IORegistryEntryGetParentEntry
1231
@abstract Returns the first parent of a registry entry in a plane.
1232
@discussion This function will return the parent to which the registry entry was first attached in a plane.
1233
@param entry The registry entry whose parent to look up.
1234
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1235
@param parent The first parent of the registry entry, on success. The parent must be released by the caller.
1236
@result A kern_return_t error code. */
1237
1238
kern_return_t
1239
IORegistryEntryGetParentEntry(
1240
io_registry_entry_t entry,
1241
const io_name_t plane,
1242
io_registry_entry_t * parent );
1243
1244
/*! @function IORegistryEntryInPlane
1245
@abstract Determines if the registry entry is attached in a plane.
1246
@discussion This method determines if the entry is attached in a plane to any other entry.
1247
@param entry The registry entry.
1248
@param plane The name of an existing registry plane. Plane names are defined in IOKitKeys.h, eg. kIOServicePlane.
1249
@result If the entry has a parent in the plane, true is returned, otherwise false is returned. */
1250
1251
boolean_t
1252
IORegistryEntryInPlane(
1253
io_registry_entry_t entry,
1254
const io_name_t plane );
1255
1256
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1257
1258
/*
1259
* Matching dictionary creation helpers
1260
*/
1261
1262
/*! @function IOServiceMatching
1263
@abstract Create a matching dictionary that specifies an IOService class match.
1264
@discussion A very common matching criteria for IOService is based on its class. IOServiceMatching will create a matching dictionary that specifies any IOService of a class, or its subclasses. The class is specified by C-string name.
1265
@param name The class name, as a const C-string. Class matching is successful on IOService's of this class or any subclass.
1266
@result The matching dictionary created, is returned on success, or zero on failure. The dictionary is commonly passed to IOServiceGetMatchingServices or IOServiceAddNotification which will consume a reference, otherwise it should be released with CFRelease by the caller. */
1267
1268
CFMutableDictionaryRef
1269
IOServiceMatching(
1270
const char * name ) CF_RETURNS_RETAINED;
1271
1272
/*! @function IOServiceNameMatching
1273
@abstract Create a matching dictionary that specifies an IOService name match.
1274
@discussion A common matching criteria for IOService is based on its name. IOServiceNameMatching will create a matching dictionary that specifies an IOService with a given name. Some IOServices created from the device tree will perform name matching on the standard compatible, name, model properties.
1275
@param name The IOService name, as a const C-string.
1276
@result The matching dictionary created, is returned on success, or zero on failure. The dictionary is commonly passed to IOServiceGetMatchingServices or IOServiceAddNotification which will consume a reference, otherwise it should be released with CFRelease by the caller. */
1277
1278
CFMutableDictionaryRef
1279
IOServiceNameMatching(
1280
const char * name ) CF_RETURNS_RETAINED;
1281
1282
/*! @function IOBSDNameMatching
1283
@abstract Create a matching dictionary that specifies an IOService match based on BSD device name.
1284
@discussion IOServices that represent BSD devices have an associated BSD name. This function creates a matching dictionary that will match IOService's with a given BSD name.
1285
@param masterPort The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
1286
@param options No options are currently defined.
1287
@param bsdName The BSD name, as a const char *.
1288
@result The matching dictionary created, is returned on success, or zero on failure. The dictionary is commonly passed to IOServiceGetMatchingServices or IOServiceAddNotification which will consume a reference, otherwise it should be released with CFRelease by the caller. */
1289
1290
CFMutableDictionaryRef
1291
IOBSDNameMatching(
1292
mach_port_t masterPort,
1293
uint32_t options,
1294
const char * bsdName ) CF_RETURNS_RETAINED;
1295
1296
CFMutableDictionaryRef
1297
IOOpenFirmwarePathMatching(
1298
mach_port_t masterPort,
1299
uint32_t options,
1300
const char * path ) DEPRECATED_ATTRIBUTE;
1301
1302
/*! @function IORegistryEntryIDMatching
1303
@abstract Create a matching dictionary that specifies an IOService match based on a registry entry ID.
1304
@discussion This function creates a matching dictionary that will match a registered, active IOService found with the given registry entry ID. The entry ID for a registry entry is returned by IORegistryEntryGetRegistryEntryID().
1305
@param entryID The registry entry ID to be found.
1306
@result The matching dictionary created, is returned on success, or zero on failure. The dictionary is commonly passed to IOServiceGetMatchingServices or IOServiceAddNotification which will consume a reference, otherwise it should be released with CFRelease by the caller. */
1307
1308
CFMutableDictionaryRef
1309
IORegistryEntryIDMatching(
1310
uint64_t entryID ) CF_RETURNS_RETAINED;
1311
1312
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1313
1314
kern_return_t
1315
IOServiceOFPathToBSDName(mach_port_t masterPort,
1316
const io_name_t openFirmwarePath,
1317
io_name_t bsdName) DEPRECATED_ATTRIBUTE;
1318
1319
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1320
1321
/*! @typedef IOAsyncCallback0
1322
@abstract standard callback function for asynchronous I/O requests with
1323
no extra arguments beyond a refcon and result code.
1324
@param refcon The refcon passed into the original I/O request
1325
@param result The result of the I/O operation
1326
*/
1327
typedef void (*IOAsyncCallback0)(void *refcon, IOReturn result);
1328
1329
/*! @typedef IOAsyncCallback1
1330
@abstract standard callback function for asynchronous I/O requests with
1331
one extra argument beyond a refcon and result code.
1332
This is often a count of the number of bytes transferred
1333
@param refcon The refcon passed into the original I/O request
1334
@param result The result of the I/O operation
1335
@param arg0 Extra argument
1336
*/
1337
typedef void (*IOAsyncCallback1)(void *refcon, IOReturn result, void *arg0);
1338
1339
/*! @typedef IOAsyncCallback2
1340
@abstract standard callback function for asynchronous I/O requests with
1341
two extra arguments beyond a refcon and result code.
1342
@param refcon The refcon passed into the original I/O request
1343
@param result The result of the I/O operation
1344
@param arg0 Extra argument
1345
@param arg1 Extra argument
1346
*/
1347
typedef void (*IOAsyncCallback2)(void *refcon, IOReturn result, void *arg0, void *arg1);
1348
1349
/*! @typedef IOAsyncCallback
1350
@abstract standard callback function for asynchronous I/O requests with
1351
lots of extra arguments beyond a refcon and result code.
1352
@param refcon The refcon passed into the original I/O request
1353
@param result The result of the I/O operation
1354
@param args Array of extra arguments
1355
@param numArgs Number of extra arguments
1356
*/
1357
typedef void (*IOAsyncCallback)(void *refcon, IOReturn result, void **args,
1358
uint32_t numArgs);
1359
1360
1361
/* Internal use */
1362
1363
kern_return_t
1364
OSGetNotificationFromMessage(
1365
mach_msg_header_t * msg,
1366
uint32_t index,
1367
uint32_t * type,
1368
uintptr_t * reference,
1369
void ** content,
1370
vm_size_t * size );
1371
1372
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1373
1374
/* Internal use */
1375
1376
kern_return_t
1377
IOCatalogueSendData(
1378
mach_port_t masterPort,
1379
uint32_t flag,
1380
const char *buffer,
1381
uint32_t size );
1382
1383
kern_return_t
1384
IOCatalogueTerminate(
1385
mach_port_t masterPort,
1386
uint32_t flag,
1387
io_name_t description );
1388
1389
kern_return_t
1390
IOCatalogueGetData(
1391
mach_port_t masterPort,
1392
uint32_t flag,
1393
char **buffer,
1394
uint32_t *size );
1395
1396
kern_return_t
1397
IOCatalogueModuleLoaded(
1398
mach_port_t masterPort,
1399
io_name_t name );
1400
1401
/* Use IOCatalogueSendData(), with kIOCatalogResetDrivers, to replace catalogue
1402
* rather than emptying it. Doing so keeps instance counts down by uniquing
1403
* existing personalities.
1404
*/
1405
kern_return_t
1406
IOCatalogueReset(
1407
mach_port_t masterPort,
1408
uint32_t flag );
1409
1410
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1411
1412
// obsolete API
1413
1414
#if !defined(__LP64__)
1415
1416
// for Power Mgt
1417
1418
typedef struct IOObject IOObject;
1419
1420
// for MacOS.app
1421
1422
kern_return_t
1423
IORegistryDisposeEnumerator(
1424
io_enumerator_t enumerator ) DEPRECATED_ATTRIBUTE;
1425
1426
kern_return_t
1427
IOMapMemory(
1428
io_connect_t connect,
1429
uint32_t memoryType,
1430
task_port_t intoTask,
1431
vm_address_t * atAddress,
1432
vm_size_t * ofSize,
1433
uint32_t flags ) DEPRECATED_ATTRIBUTE;
1434
1435
// for CGS
1436
1437
kern_return_t
1438
IOCompatibiltyNumber(
1439
mach_port_t connect,
1440
uint32_t * objectNumber ) DEPRECATED_ATTRIBUTE;
1441
1442
// Traditional IOUserClient transport routines
1443
kern_return_t
1444
IOConnectMethodScalarIScalarO(
1445
io_connect_t connect,
1446
uint32_t index,
1447
IOItemCount scalarInputCount,
1448
IOItemCount scalarOutputCount,
1449
... ) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5;
1450
1451
kern_return_t
1452
IOConnectMethodScalarIStructureO(
1453
io_connect_t connect,
1454
uint32_t index,
1455
IOItemCount scalarInputCount,
1456
IOByteCount * structureSize,
1457
... ) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5;
1458
1459
kern_return_t
1460
IOConnectMethodScalarIStructureI(
1461
io_connect_t connect,
1462
uint32_t index,
1463
IOItemCount scalarInputCount,
1464
IOByteCount structureSize,
1465
... ) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5;
1466
1467
kern_return_t
1468
IOConnectMethodStructureIStructureO(
1469
io_connect_t connect,
1470
uint32_t index,
1471
IOItemCount structureInputSize,
1472
IOByteCount * structureOutputSize,
1473
void * inputStructure,
1474
void * ouputStructure ) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5;
1475
1476
// Compatability with earlier Mig interface routines
1477
#if IOCONNECT_NO_32B_METHODS
1478
1479
kern_return_t
1480
io_connect_map_memory(
1481
io_connect_t connect,
1482
uint32_t memoryType,
1483
task_port_t intoTask,
1484
vm_address_t *atAddress,
1485
vm_size_t *ofSize,
1486
IOOptionBits options) DEPRECATED_ATTRIBUTE;
1487
1488
kern_return_t
1489
io_connect_unmap_memory(
1490
io_connect_t connect,
1491
uint32_t memoryType,
1492
task_port_t fromTask,
1493
vm_address_t atAddress) DEPRECATED_ATTRIBUTE;
1494
1495
kern_return_t
1496
io_connect_method_scalarI_scalarO(
1497
mach_port_t connection,
1498
int selector,
1499
io_scalar_inband_t input,
1500
mach_msg_type_number_t inputCnt,
1501
io_scalar_inband_t output,
1502
mach_msg_type_number_t *outputCnt) DEPRECATED_ATTRIBUTE;
1503
1504
kern_return_t
1505
io_connect_method_scalarI_structureO(
1506
mach_port_t connection,
1507
int selector,
1508
io_scalar_inband_t input,
1509
mach_msg_type_number_t inputCnt,
1510
io_struct_inband_t output,
1511
mach_msg_type_number_t *outputCnt) DEPRECATED_ATTRIBUTE;
1512
1513
kern_return_t
1514
io_connect_method_scalarI_structureI(
1515
mach_port_t connection,
1516
int selector,
1517
io_scalar_inband_t input,
1518
mach_msg_type_number_t inputCnt,
1519
io_struct_inband_t inputStruct,
1520
mach_msg_type_number_t inputStructCnt) DEPRECATED_ATTRIBUTE;
1521
1522
kern_return_t
1523
io_connect_method_structureI_structureO(
1524
mach_port_t connection,
1525
int selector,
1526
io_struct_inband_t input,
1527
mach_msg_type_number_t inputCnt,
1528
io_struct_inband_t output,
1529
mach_msg_type_number_t *outputCnt) DEPRECATED_ATTRIBUTE;
1530
1531
kern_return_t
1532
io_async_method_scalarI_scalarO(
1533
mach_port_t connection,
1534
mach_port_t wake_port,
1535
io_async_ref_t reference,
1536
mach_msg_type_number_t referenceCnt,
1537
int selector,
1538
io_scalar_inband_t input,
1539
mach_msg_type_number_t inputCnt,
1540
io_scalar_inband_t output,
1541
mach_msg_type_number_t *outputCnt) DEPRECATED_ATTRIBUTE;
1542
1543
kern_return_t
1544
io_async_method_scalarI_structureO(
1545
mach_port_t connection,
1546
mach_port_t wake_port,
1547
io_async_ref_t reference,
1548
mach_msg_type_number_t referenceCnt,
1549
int selector,
1550
io_scalar_inband_t input,
1551
mach_msg_type_number_t inputCnt,
1552
io_struct_inband_t output,
1553
mach_msg_type_number_t *outputCnt) DEPRECATED_ATTRIBUTE;
1554
1555
kern_return_t
1556
io_async_method_scalarI_structureI(
1557
mach_port_t connection,
1558
mach_port_t wake_port,
1559
io_async_ref_t reference,
1560
mach_msg_type_number_t referenceCnt,
1561
int selector,
1562
io_scalar_inband_t input,
1563
mach_msg_type_number_t inputCnt,
1564
io_struct_inband_t inputStruct,
1565
mach_msg_type_number_t inputStructCnt) DEPRECATED_ATTRIBUTE;
1566
1567
kern_return_t
1568
io_async_method_structureI_structureO(
1569
mach_port_t connection,
1570
mach_port_t wake_port,
1571
io_async_ref_t reference,
1572
mach_msg_type_number_t referenceCnt,
1573
int selector,
1574
io_struct_inband_t input,
1575
mach_msg_type_number_t inputCnt,
1576
io_struct_inband_t output,
1577
mach_msg_type_number_t *outputCnt) DEPRECATED_ATTRIBUTE;
1578
#endif // IOCONNECT_NO_32B_METHODS
1579
1580
#endif /* defined(__LP64__) */
1581
1582
__END_DECLS
1583
1584
#endif /* ! _IOKIT_IOKITLIB_H */
1585
1586