• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pass socket to kernel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re(2): Pass socket to kernel?
      • From: "Peter Lovell" <email@hidden>
  • Next by Date: Re: Macnetworkprog Digest, Vol 3, Issue 221
  • Next by thread: Re(2): Pass socket to kernel?
  • Index(es):
    • Date
    • Thread