Re: User-space to kernel communication
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com - Greg On Jan 8, 2007, at 6:17 PM, Greg Miller wrote: G~ Like I said, I'm trying to send the kernel variable length data of around 50 bytes. I am using the IOKit but I would also like to know how to do this without it. Is there any documentation on this? I would really prefer to avoid blindly going through header files. - Greg On Jan 8, 2007, at 3:15 PM, Josh Graessley wrote:
This depends on what you are trying to communicate with in the kernel. If you are already using IOKit, I would imagine an IOUserClient would be the way to go. If you're writing a non-IOKit kext, you may want to look in to a kernel control socket (sys/ kern_control.h).
-josh
On Jan 7, 2007, at 6:40 PM, Greg wrote:
Hi, what is the best way(s) to send variable length data (around 50 bytes or so) to a kernel extension from a user-land application? Are there different ways to do this if the kext uses the IOUserClient schema to talk to user-land apps? If you could also point me to documentation or a tutorial on how to do this I would be much obliged!
Thanks,
- Greg _______________________________________________ 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/jgraessley% 40apple.com
This email sent to jgraessley@apple.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/jgm%40google.com This email sent to jgm@google.com -- Greg Miller jgm@google.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... Sorry for the followup, but perhaps somebody could just advice me on a specific method. That document does provide details for the sysctl API but skims over memory-mapping and a few others. Apple provides an IODataQueue example but that is only for kernel -> user-client communication, I'm not exactly sure how I would reverse that direction. However, it seems that sysctl is a viable option for my purposes. It does seem to be able to handle variable length data of moderate size, I guess I'll just use that. The reason for my confusion is simply the shear number of options and the rather sparse documentation on them; I'm just trying to find the "correct" way of doing this... Take a look at the document at http://developer.apple.com/documentation/Darwin/Conceptual/ KernelProgramming/boundaries/chapter_14_section_1.html#//apple_ref/ doc/uid/TP30000905-CH217-DontLinkElementID_9 On 1/8/07, Greg <greg@kinostudios.com> wrote: This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg