site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Alexei _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... On Jun 23, 2008, at 5:47 PM, Robert Kukuchka wrote: Is there an easy way to "switch planes" for iteration within the IORegistry? Or perhaps I'm missing some fundamental concept. Essentially I've got USB devices that I'm finding through notifications. From there I want to discover information within the context of the service plane. It seems silly for me to have to start a the root of the service plane. Can IOUsbDevice act as a "via" to another plane? Sure. Once you have a reference to a registry entry, it doesn't matter which plane you got it from; they're all the same. The specific context is I wish to discover the IOSerialBSDClients a device publishes. My thought was to get the USBDevice (such as in USBNotificationExample), then iterating the children of that device. Are you an in-kernel or user-space client? Both sets registry iteration APIs allow you to start at a specific entry in a specific plane. For the kernel, use IORegistryIterator::iterateOver(), and for a user application, call IORegistryEntryCreateIterator() and pass the appropriate entry and plane. If you just want direct children, you can simplify things by using getChildIterator() or IORegistryEntryGetChildIterator(), respectively, both of which also take the plane as an argument. This email sent to site_archiver@lists.apple.com