Freddie Witherden
2010-09-13 23:29:24 UTC
Hello,
I am in the process of porting my FireWire library to Windows. It
currently runs on OS X and Linux -- so I have some experience with
FireWire devices and APIs.
As Windows does not provide a user-space API my plan is to use the
KMDF to expose the functionality I require from the stack via device
ioctls. I have looked over the KMDF portion of the 'vdev_hybrid'
sample in the WDK. The kernel interface seems fine.
However, if I understand it correctly: the associated application asks
the stack to create a 'virtual device'. Windows does not know how to
handle this, so asks for a device driver, the user supplies the
associated sys. Windows loads the driver and we all eat cake (which,
like the virtual device, is a lie :-).
My library needs access to *all* 1394 devices attached to the system.
That is to say that it is not associated with any one CSR unit
directory -- if it is a 1394 device I'm interested. I am therefore
guessing that my driver will need to sit 'above' the 1394 stack (so
that it can query the list of devices, maintain handles to them, etc,
etc).
Looking through <1394.h> I see quite a few local operations (such as
adding CSR unit directories). What should be used as a device handle
in these cases? For example, in Linux the OHCI is itself a device (/
dev/fw0), while IOKit has a special device node for the system.
So I guess my question is: how from my kernel code get I get and
maintain a list of attached 1394 devices without tripping up on PnP
etc?
Polemically yours, Freddie.
P.S. For those that are interested the primary purpose of my library
is to aid in performing memory forensics. This is why any and all
devices are of interest.
I am in the process of porting my FireWire library to Windows. It
currently runs on OS X and Linux -- so I have some experience with
FireWire devices and APIs.
As Windows does not provide a user-space API my plan is to use the
KMDF to expose the functionality I require from the stack via device
ioctls. I have looked over the KMDF portion of the 'vdev_hybrid'
sample in the WDK. The kernel interface seems fine.
However, if I understand it correctly: the associated application asks
the stack to create a 'virtual device'. Windows does not know how to
handle this, so asks for a device driver, the user supplies the
associated sys. Windows loads the driver and we all eat cake (which,
like the virtual device, is a lie :-).
My library needs access to *all* 1394 devices attached to the system.
That is to say that it is not associated with any one CSR unit
directory -- if it is a 1394 device I'm interested. I am therefore
guessing that my driver will need to sit 'above' the 1394 stack (so
that it can query the list of devices, maintain handles to them, etc,
etc).
Looking through <1394.h> I see quite a few local operations (such as
adding CSR unit directories). What should be used as a device handle
in these cases? For example, in Linux the OHCI is itself a device (/
dev/fw0), while IOKit has a special device node for the system.
So I guess my question is: how from my kernel code get I get and
maintain a list of attached 1394 devices without tripping up on PnP
etc?
Polemically yours, Freddie.
P.S. For those that are interested the primary purpose of my library
is to aid in performing memory forensics. This is why any and all
devices are of interest.