Re: communication from kext to user space application
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Godfrey On 2008-03-27, at 10:08 , Andrew Gallatin wrote: No. You could create a character device and support read on it, or create an ioctl that copied the data to userspace. Or you could use a sysctl node. Drew _______________________________________________ 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/gvdl%40mac.com _______________________________________________ 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... It really depends on what area of the kernel your kext resides in, if it is a standard BSD style kernel module then you are probably publishing through bdevsw/cdevsw. In which case the ioctl route is by far the easiest solution. Implement a simple little ioctl that passes a pointer into your kext, then the kext can copyout the pointer to the client code. There are some details (64/32 bit address spaces, etc) but you can look this up in sample code. If however your code is naturally an IOKit project then the IOKit mechanisms are probably the way to go. As usual on this list there is no right solution it depends on the context of the problem. So i definitely have to use some IOKit stuff even if do not deal with =20= IO at all? I simply need to pass a c-string from my kext to user =20 space. All this stuff seems to be a bit overkill for this task... As you can guess i'm relatively new to this so any useful hint will be =20= This email sent to gvdl@mac.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Godfrey van der Linden