lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Ross, William:

> Just to confirm, on Windows IPV6_V6ONLY is also 27. From Ws2ipdef.h in the Windows SDK:

Thank you for the details; I've seen some of these resources, but for some reason I thought that this is a boolean value. In fact, Microsoft documentation seems to point to that (from the first resource you referenced):

IPV6_V6ONLYyesyesDWORD (boolean)

The RFC seems to describe a boolean value as well. I'm not sure where the number 27 comes from (I haven't checked the header files), but will update to match the number (and it shouldn't make any difference if it's a boolean value).

Paul.


On Tue, Apr 9, 2013 at 1:56 AM, Ross Bencina <rossb-lists@audiomulch.com> wrote:
On 8/04/2013 7:02 AM, William Ahern wrote:
IPV6_V6ONLY is a socket option (setsockopt(3)) originating with the
Basic Socket Interface Extensions for IPv6 (RFC 3493).

        http://tools.ietf.org/html/rfc3493.html#page-22

On BSDs the value of this option is `27'. Defining it to `1' is probably
wrong. It may do the right thing with #ifdef guarded code, but it may result
in weird things happening if the option is actually used.

Just to confirm, on Windows IPV6_V6ONLY is also 27. From Ws2ipdef.h in the Windows SDK:

#define IPV6_V6ONLY           27 // Treat wildcard bind as AF_INET6-only.

Note that Windows XP doesn't support dual stack sockets, and this flag has the opposite default than on most Unices.


http://msdn.microsoft.com/en-us/library/windows/desktop/ms738574(v=vs.85).aspx

See also the note here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms737937(v=vs.85).aspx


http://stackoverflow.com/questions/2693709/what-was-the-motivation-for-adding-the-ipv6-v6only-flag

Not that I know more than that, but I was curious so looked it up.

Ross.