Your driver’s information property list contains at least one personality dictionary that specifies the type of device your driver can manage. A personality dictionary can also contain information pertinent to your driver’s runtime configuration. When your driver is instantiated, it receives a copy of the I/O Kit personality for which it was loaded and it can use this information to make sure it is suitable to drive the device and, optionally, to configure itself to meet the device’s needs.
The I/O Kit personality your driver receives is in the form of an OSDictionary, which is one of the libkern collection classes. The libkern C++ library defines container classes, which hold primitive values, such as numbers and strings, and collection classes, which hold groups of both container objects and other collection objects. This chapter first describes ways in which your driver can use the libkern collection and container classes, then it gives an overview of these classes and their methods. The chapter concludes with code samples that illustrate how your driver can use the libkern classes to configure itself.
For more information on the libkern library and how it supports loadable kernel modules, see “The libkern C++ Runtime” and I/O Kit Fundamentals. For API reference documentation on the libkern classes, see Device Drivers Documentation. On Mac OS X, you can find the libkern library in /System/Library/Frameworks/Kernel.framework/Headers/libkern/c++.
The libkern Classes and Your Driver
libkern Collection and Container Class Overview
Using the libkern Collection and Container Classes
Configuring Your Driver Using the libkern Classes
Last updated: 2007-03-06