Re: communication from kext to user space application
Re: communication from kext to user space application
- Subject: Re: communication from kext to user space application
- From: Godfrey van der Linden <email@hidden>
- Date: Tue, 1 Apr 2008 22:36:50 -0700
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.
Godfrey
On 2008-03-27, at 10:08 , Andrew Gallatin wrote:
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=
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
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