• 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: bsd sockets + selecting network interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bsd sockets + selecting network interface


  • Subject: Re: bsd sockets + selecting network interface
  • From: Joe Lake <email@hidden>
  • Date: Tue, 16 Dec 2008 19:36:17 +0000 (UTC)

hi james,

This might be an error with your client handling IPv6 socket addresses, i.e. you didn't set the sin6_scope_id field properly, or it might be an error caused by the server not being attached to the network where the client host's primary active interface is attached, while the server is advertising an IPv4 address in mDNS outside the client's configured subnet.

I'm not sure I understand. At this point, I'm only using IPv4. Is what I'm trying to do only possible with IPv6?


Let's suppose the server is advertising the service on a network that is not attached to the client's primariy interface, but instead to the client's secondary interface. The client still discovers this service, but when it tries to communicate with it, the datagram goes out the wrong (primary) interface. How do I make the client send out the secondary interface?

Also, how do I discover in the first place which interface the service was being advertised one. I see that this is possible using the DNSSD API (http://developer.apple.com/qa/qa2001/qa1333.html), but I can't see if this can be accomplished using the CFNetServices API.

or am I misunderstanding the nature of the problem entirely? here is some more information about the problem that has arisen. I have two machines on a local network: a server and a client. the server advertises a service, the client discovers it, and then sends it data via UDP (currently using the CFNetServices API and BSD sockets). Now the two machines are connected using two active network interfaces (the built in ethernet port and a usb ethernet interface). In this configuration, the server advertises a service, the client discovers it, but no communication happens between the too. In a third scenario, the two machines are connected using only one active network interface. Communication is established between the client and server, then the second network interface is made active and communication between the client and server continues uninterrupted.

Thank you for your help!

Joe

Both of the above are pretty common mistakes.


-- james woodyatt <email@hidden> member of technical staff, communications engineering


_______________________________________________ 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
_______________________________________________
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: bsd sockets + selecting network interface
      • From: Jens Alfke <email@hidden>
    • Re: bsd sockets + selecting network interface
      • From: james woodyatt <email@hidden>
References: 
 >bsd sockets + selecting network interface (From: Joe Lake <email@hidden>)
 >Re: bsd sockets + selecting network interface (From: Josh Graessley <email@hidden>)
 >Re: bsd sockets + selecting network interface (From: james woodyatt <email@hidden>)

  • Prev by Date: Re: NSURLConnection and FTP directory content?
  • Next by Date: Re: bsd sockets + selecting network interface
  • Previous by thread: Re: bsd sockets + selecting network interface
  • Next by thread: Re: bsd sockets + selecting network interface
  • Index(es):
    • Date
    • Thread