Re: Deadlock in My KEXT with NKE
Re: Deadlock in My KEXT with NKE
- Subject: Re: Deadlock in My KEXT with NKE
- From: Vincent Lubet <email@hidden>
- Date: Thu, 12 Feb 2004 11:45:59 -0800
I do not think that using sysctl as a private communication mechanism
between a KEXT and a daemon is a good idea.
There are many alternative to choose from,:
- local sockets
- device
- SYSPROTO_CONTROL sockets
Because you seem to be using a NKE, I would recommend using a local
socket or a SYSPROTO_CONTROL socket.
SYSPROTO_CONTROL sockets they have be designed to provide a control
mechanism between user space and NKE and you won't have to switch
funnels (looking back into the archive that was first suggesed by Ollie
2 weeks ago).
There is no man page and no documentation about using SYSPROTO_CONTROL
sockets but you can learn how to use them by looking at the ppp
project. The header file is <sys/sys_domain.h>
Vincent
PS: Always keep in mind the current NKE API is unstable and subject to
change in the future.
On Feb 12, 2004, at 11:04 AM, matt jaffa wrote:
Right now I am having my Daemon do a sysctlbyname and setting a
value in the KEXT to make it aware that it is running, does this
sound like an ok way to do it.
On Thursday, February 12, 2004, at 11:20 AM, Vincent Lubet wrote:
On Feb 11, 2004, at 6:25 PM, Matt Jaffa wrote:
Also is there a way for the KEXT to detect if a daemon is running?
This is done by having the daemon to initiate some kind of
communication channel to the KEXT. This way the daemon becomes a kind
of client of the KEXT. If there are no communication channel, there
is no daemon running.
_______________________________________________
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.