Re: Deadlock in My KEXT with NKE
Re: Deadlock in My KEXT with NKE
- Subject: Re: Deadlock in My KEXT with NKE
- From: Mike Smith <email@hidden>
- Date: Sat, 14 Feb 2004 23:49:49 -0800
With the exception of client termination notification, I think Matt
might be better off using sysctl. Sockets mostly just add overhead and
confusion, especially if the developer doesn't appreciate the
subtleties of their decoupled nature.
= Mike
On Feb 14, 2004, at 6:37 PM, Vincent Lubet wrote:
On Feb 14, 2004, at 2:58 PM, Matt Jaffa wrote:
I have been trying to implement this System control socket, but can't
seem to get it to work, The problem is I don't know how to make
sockets within the KERNEL connect up with the socket in my Daemon.
I wan't the Daemon socket to act as the server and the KEXT socket to
call out when it has work to do then wait to receive a message back.
I can do this with AF_UNIX when it is daemon to daemon, but I
can't get KEXT to daemon sockets to work.
Do you know of any code out there that can demonstrate the KEXT
connecting to a daemon socket?
I do not know of any AF_UNIX code but the kernel NFS code shows how to
use sockets from the kernel.
Using sockets in the kernel is pretty similar to using sockets in user
space except the function are different. The main point is you cannot
use select() and instead you should set the so_upcall with the address
of a function that gets the event notification.
Basically this is what you should do:
1) call socreate()
2) set the so_upcall and associated field
3) call soconnect() with the address of the deamon.
Vincent
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.