When you access a device from user space, whether you use a device interface or the POSIX API, you use a combination of I/O Kit functions and specific device-family functions to work with the I/O Kit objects that represent the device. The IOKitLib, located in the I/O Kit framework, contains the generic I/O Kit functions you use to implement user-space task access to in-kernel device objects.
This chapter surveys the IOKitLib functions, describing how to use them to get access to and manipulate in-kernel objects and providing insight into how the IOKitLib implements these functions.
Some of the functions in the IOKitLib are intended for developers of custom device interfaces rather than for developers of applications that use existing device interfaces. Although this chapter covers these functions at a high level, you should read “Making Hardware Accessible to Applications” in I/O Kit Device Driver Design Guidelines if you need to develop your own device interface–user client solution.
The IOKitLib functions can be divided into several categories, based on the type of service they provide. This chapter mirrors these groupings and is divided into the following sections, each of which covers a functional category:
“Object Reference-Counting and Introspection” introduces the types of objects you use to communicate with in-kernel entities and describes how to get information about them and keep track of their reference counts.
“Device Discovery and Notification” describes the functions you use to create matching dictionaries, look up and access matching devices in the I/O Registry, and receive notifications about a device’s state change.
“I/O Registry Access” describes other IOKitLib functions you can use to get access to objects in the I/O Registry.
“Device-Interface Development” gives a brief overview of the IOKitLib functions you use when no I/O Kit device-family or third-party device interface exists and you need to develop your own device interface.
Last updated: 2007-02-08