Subject: bind/sctp_bindx API - binding to all IPv4 and IPv6 addresses

From: David Lehmann <[email-masked]>
Date: Mon, 07 Feb 2005 14:09:11 -0500

Hello,

In the SCTP API draft, section 4.1.2, it states:
    If addr is specified as a wildcard (INADDR_ANY for an IPv4 address,
    or as IN6ADDR_ANY_INIT or in6addr_any for an IPv6 address), the
    operating system will associate the endpoint with an optimal address
    set of the available interfaces.

If an app passes the AF_INET6 wildcard address to bind() with a PF_INET6
socket, does it bind to all IPv4 _and_ IPv6 addresses since an PF_INET6
socket "can use both IPv6 and IPv4 addresses"?

If not, how does an app bind to all IPv6 and IPv4 addresses?

-- 

David Lehmann                          Ulticom, Inc.
AOL/Yahoo IM: davidULCM                1020 Briggs Road
1-856-787-2729                         Mt. Laurel, NJ 08054   USA

---

From: David Lehmann <[email-masked]>
Date: Mon, 07 Feb 2005 16:12:08 -0500

Michael Tuexen wrote:
> Hi David,
> 
> my understanding is that
> if you specify the IPv4 wildcard address you get only IPv4 addresses
> if you specify the IPv6 wildcard address you get IPv4 and IPv6 addresses.

Thanks.  Maybe the spec should explicitly state this.

--

---

From: Michael Tuexen <[email-masked]>
Date: Mon, 7 Feb 2005 22:02:00 +0100

Hi David,

my understanding is that
if you specify the IPv4 wildcard address you get only IPv4 addresses
if you specify the IPv6 wildcard address you get IPv4 and IPv6 
addresses.

Best regards
Michael

---

From: Randall Stewart <[email-masked]>
Date: Tue, 08 Feb 2005 11:23:52 -0500

> Thanks.  Maybe the spec should explicitly state this.
Actually.. some os's have an option as well that tells
it NOT to include V4 addresses...

aka a V6_ONLY option.. I know its that way in FreeBSD and
NetBSD...

R

-- 
Randall Stewart
ITD
803-345-0369 <or> 815-342-5222

---

From: "Peter Lei (peterlei)" <[email-masked]>
Date: Tue, 08 Feb 2005 10:31:12 -0600

There are IPv6 socket options and kernel sysctl's (in BSD and MacOS X)
that allow you to turn off allowing mapped-v4 addresses from being
bound to or used on a PF_INET6 socket, so the behavior below isn't
always true.

regards,
--peter

---

From: "Peter Lei (peterlei)" <[email-masked]>
Date: Tue, 08 Feb 2005 10:33:58 -0600

regards,
--peter

---

From: Kacheong Poon <[email-masked]>
Date: Tue, 08 Feb 2005 11:43:51 -0800

> aka a V6_ONLY option.. I know its that way in FreeBSD and

It is the IPPROTO_IPV6 level option IPV6_V6ONLY.  It is
specified in RFC 3493.  So I think most socket based
v6 implementations have that.

-- 

						K. Poon.
						[email-masked]