• 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: interfaces and ipv6 again...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interfaces and ipv6 again...


  • Subject: Re: interfaces and ipv6 again...
  • From: Joshua Graessley <email@hidden>
  • Date: Fri, 25 Jul 2003 10:50:14 -0700

On Friday, July 25, 2003, at 4:12, Sebastian Mecklenburg wrote:

hello,
i still have problems with the interface for ipv6 connections. right now, when i want to establish a connection over sockets with ipv6, i have to specify the interface for the client _and_ the server socket like

sockaddr_in6 addr;
int scope = ::if_nametoindex("en1");
addr.sin6_scope_id = scope;
//fill in the other fields of addr
//do connect() for clients or bind() for server sockets

here the server and client are directly connected over the ethernet port. and the addresses i use are the default local-link ipv6 addresses of the specified interfaces (the ones that are made up from the MAC addresses). if i omit the interface, the connect() function for the client returns a "no route to host" error. is there any way i can avoid the specification of the interface?

On the server side, you can bind to the IPV6 any addresses instead of a specific address. On the client side, if you use getaddrinfo on Panther, resolving a dot-local name will give you back a sockaddr_In6 with the sin6_scope_id filled in for you.

In addition, if you use Rendezvous to discover the service, on Panther, the services will resolve to IPv4 and IPv6 addresses. The IPv6 addresses will contain the scope_id when necessary. The scope_id is only important for Link Local addresses (and possibly site-local, but it looks like site-locals are being depricated).

-josh
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >interfaces and ipv6 again... (From: email@hidden (Sebastian Mecklenburg))

  • Prev by Date: Rendezvous services lookup problem
  • Next by Date: Re: WebServices && SSL && servers with un-trusted certificates
  • Previous by thread: interfaces and ipv6 again...
  • Next by thread: Rendezvous services lookup problem
  • Index(es):
    • Date
    • Thread