Re: sosend, soreceive, soconnect
Re: sosend, soreceive, soconnect
- Subject: Re: sosend, soreceive, soconnect
- From: Matt Jaffa <email@hidden>
- Date: Mon, 19 Jan 2004 23:38:34 -0700
So far i have the daemon running and the KEXT is already written, I
just need to be able to communicate between the two and also tidy up
the way i handle when there are many connections put on hold while my
daemon is doing some work to see if it will allow the connection.
On Jan 19, 2004, at 10:29 PM, Justin Walker wrote:
On Monday, January 19, 2004, at 09:05 PM, Matt Jaffa wrote:
Amanda and others:
I would love to implement what SimpleUserClient is doing but with my
application, instead of the KERNEL socket AF_UNIX implementation, I
don't know exactly how to do it.
You can't use the UserClient interface for your project, since it is
designed for IOKit usage, and yours is not an IOKit kext.
So I have a KEXT that is a socket/Protocol filter. And I insert my
code to do all the checking within the send function that is within
my filter.
How am i supposed to do this,
You need to review kernel code. I don't think there is anyone else
with enough time to design and program your project for you.
my daemon will keep checking with the KEXT to see if it has work
to do? And within my send function i block it with a semaphore???
Until the daemon picks it up, signals then does work and then the
daemon goes back to checking for work to do????
As I mentioned earlier, there is code in the 'bsd/netat' directory
that does something similar. NFS clients and servers do similar
things, but the code is much more complex than the AURP 'daemon' that
runs (or, more accurately, ran) in kernel mode. As long as you want to
block awaiting incoming datagrams, you need a thread on which to
sleep, and therefore you need to create a kernel process.
And what if the daemon is not running, it won't be polling for work
to do, so the stuff that is sitting in semaphore_wait mode will
always wait and nothing will work.
If your user-mode component is not running, the kernel-mode component
should exit. The AURP code should give a hint regarding the way to do
this. See also the NFS client and server code.
Please advise me in this area,
I am looking to finish my project quickly.
You will need to adjust your goals. It doesn't appear that you have
much experience with this kind of development, and this is tricky
code.
What do you have running so far?
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | It's not whether you win or
lose...
| It's whether *I* win or lose.
*--------------------------------------
*-------------------------------*
_______________________________________________
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.