Re: Pass socket to kernel?
Re: Pass socket to kernel?
- Subject: Re: Pass socket to kernel?
- From: email@hidden
- Date: Sat, 30 Dec 2006 15:15:30 -0800
It sounds like it might be better for me to have the user space code
drive the interactive processes, but have the kernel create the socket
and do all the reads/writes:
App tells kernel to connect to host A.
Kernel opens socket and connects.
If server requires auth, tell app to ask user.
App gets auth info from user and send it to kernel.
Kernel uses auth info from app to negotiate with server.
etc.
I had hoped to avoid a lot of this back and forth messaging by doing
as much as possible in user space. From what I can tell, even doing
something like a DNS lookup requires user-space code since APIs like
getaddrinfo don't seem to be available in the kernel. So I think I'll
need to call getaddrinfo, send the first address to the kernel to try
and if kernel responds that it failed, try the next one, etc.
Unless there is an easier way, this doesn't seem too bad though. It's
sorta like doing it from an app except instead of waiting for
something like a CFSocket callback for a connect failure, it's waiting
for callback from a kernel notification saying it failed to connect.
Thanks for responses.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden