> I am looking for some code examples of kext to user space code.
For BSD level code I generally recommend kernel control sockets, as illustrated by the tcplognke sample code.
<https://developer.apple.com/library/mac/#samplecode/tcplognke/>
In my experience it's very hard to get Mach messaging right and, when you get it from from kernel code, you end up rebooting a lot )-:
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (Darwin...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/darwin-kernel/darwin-kernel-garchive-95844%40googlegroups.com
This email sent to darwin-kernel-...@googlegroups.com
>
> On 6 Mar 2012, at 22:13, me wrote:
>
>> I am looking for some code examples of kext to user space code.
>
> For BSD level code I generally recommend kernel control sockets, as illustrated by the tcplognke sample code.
>
> <https://developer.apple.com/library/mac/#samplecode/tcplognke/>
I second this recommendation. I've used kernel control sockets for all sorts of things, and they're 1) brain dead simple compared to some alternatives and 2) pretty robust--I haven't had a major bug yet related to any of the kernel control socket functionality.
> In my experience it's very hard to get Mach messaging right and, when you get it from from kernel code, you end up rebooting a lot )-:
Or worse, your customer finds the corner cases and *they* reboot a lot…
Kevin