FW: Callback from NKE
FW: Callback from NKE
- Subject: FW: Callback from NKE
- From: "Carl Smith" <email@hidden>
- Date: Thu, 17 Feb 2005 11:50:18 -0500
- Thread-topic: Callback from NKE
Vincent-
Excuse my igronance, being I am new to both Mac OS X and unix, from what you wrote below, then you are saying that my select() or CFSocket would be intiated and used in userland? Do you know of any example code using this method?
Thanks
Carl
-----Original Message-----
From: Vincent Lubet
Sent: Wednesday, February 16, 2005 8:33 PM
To: Carl
Cc: email@hidden
Subject: Re: Callback from NKE
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
---
Incoming 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
---
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:
This email sent to email@hidden