Re: driver stacked on top of another driver
Re: driver stacked on top of another driver
- Subject: Re: driver stacked on top of another driver
- From: Dean Reece <email@hidden>
- Date: Tue, 28 Jun 2005 16:00:30 -0700
On Jun 28, 2005, at 01:56, santosh katvate wrote:
I am new to mac os x driver development.
Welcome to the Platform!
I want to know whether we can stack a driver on top of other driver
So that we will be able to trap all the read/write request.
Yes, this is fairly straight forward. Whole disks, as well as
partitions, are represented in IOKit by IOMedia objects. Each such
object represents some number of bytes of persistent storage. All
reads and writes to the underlying device (or partition) goes through
these objects. You can insert IOMedia Filter objects between each of
these objects and their clients such that the read & write requests
go through your object.
If you go to http://developer.apple.com and search for "IOMedia" and
"Filter", you'll find several relevant documents. You'll wind up
creating a kernel extension (KEXT) that contains a class which is a
subclass of IOMedia. It will use IOKit matching to make sure it
stacks on top of the IOMedia objects of interest, being careful that
it doesn't match on itself or you'll end up with an infinite stack.
This has been discussed on this forum as well as Darwin Drivers, so
you may also want to search the archives.
Cheers,
- Dean
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden