I've made a question on StackOverflow thinking it was the right place for asking, but they directed me here because they think its a SuperUser-releated topic. So here I am :)
I'd like to ask you how can I autoload my driver for a particular device on a Mac.
I have made a driver written in C, and now I was wondering how can I run this program in my macos(/linux/windows) environment whenever my device is plugged in. In short: how can I recognize, by system default, if this device is plugged to mac by vendor+product id( or to a linux or windows) and start my driver? Or how can I transform my C-driver in kext and autoload it? In lkm? (dll(?) for windows?)
Thanks you!
P.S. I know there are some specific OS-dependent APIs for kernel interaction, but for the moment I'd be grateful if I could load my C-driver from a "close-to-codeless" kernel extension, what I want to achieve is:
1 - When I plug my usb device, my system is able to recognize it
2 - my system load my custom kernel extension that ..
3 - ... will run my external C program to handle device.
(4- Of course when finishing, clean all)
Is it possibile or I have no choice than that to use Kernel APIs?
Thanks you so much!
udev
.