Re: Callback from NKE
Re: Callback from NKE
- Subject: Re: Callback from NKE
- From: Vincent Lubet <email@hidden>
- Date: Wed, 16 Feb 2005 17:33:23 -0800
Carl,
Your userland program uses a kernel control socket file descriptor to
communicate with your kernel control module. A kernel control socket
file descriptor is above all a file descriptor so you can use a kernel
control socket file descriptor userland API that work with socket file
descriptors.
To avoid to poll you can for example use select() or CFSocket for this
with a call back function.
Vincent
On Feb 16, 2005, at 3:24 PM, Carl Smith wrote:
I have an NKE that I currently have registered using ctl_register
function and from my userland I connect to the NKE using sockets,
that is calling socket(PF_SYSTEM, SOCK_DGRM, SYSPROTO_CONTROL) then
on success connect().
What I would like to do is be able for the NKE to signal or notify
the app when it has some something to do or send, without the app
going into a constant loop waiting for data via a recv() function.
Someone had mentioned the possibility of using CFSocket for this with
a call back function.
I am not sure if this possible using a NKE and that is my question.
Can my idea be done using CFSocket and if yes are there any examples
of this using a kext? Of if not any other suggestions?
Thanks
Carl
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.853 / Virus Database: 581 - Release Date: 2/1/2005
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
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