Re: processing IOService in kext
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hello DM, On Nov 17, 2004, at 2:04 AM, calcmach@actcom.net.il wrote: -- Hi, I am trying to further implement the following Apple Kernel sample. How do I parse / filter / the IOService which is handed to me? Why do you want to intercept file I/O calls? --gc Note: this is a kext with KERNEL = 1, so not all api's are accessible. Thanks, DM getProvider()->read(this, byteStart, buffer, completion); } _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/gcummings%40apple.com This email sent to gcummings@apple.com __________________________________________________________________ Garth Cummings Apple Developer Technical Support gcummings@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com I have tried several options, but am getting nowhere. I need to know the name of the class (open, create, etc) and the specific params for each call client->serviceMatching( "open", table ); A filter scheme is located well below the filesystem, so it has no knowledge of UNIX syscalls or files. A filter scheme only knows about reading/writing a buffer at a particular location on an IOMedia object. An IOMedia object is typically either a partition or the entire medium. The IOService handed to you is the IOMedia object published by the filter scheme. P.S. Please do not cross-post to multiple lists. If you do, people on one list don't know anything about the responses on the other list. I'm replying to the darwin-dev list only. ======= Apple Code ======= void com_apple_dts_driver_SampleFilterScheme::read(IOService* client , UInt64 byteStart, IOMemoryDescriptor* buffer, IOStorageCompletion completion) { // Read data from the storage object at the specified byte offset into the // specified buffer, asynchronously. When the read completes, the caller // will be notified via the specified completion action. // // The buffer will be retained for the duration of the read. // // For simple partition schemes, the default behavior is to simply pass the // read through to the provider media. More complex partition schemes such // as RAID will need to do extra processing here. // http://developer.apple.com/technicalsupport smime.p7s
participants (1)
-
Garth Cummings