On Mon, 2009-04-20 at 19:26 +0200, Fredrik Thulin wrote:
> Mikael Magnusson wrote:
> > On Mon, 2009-04-06 at 22:18 +0200, Mikael Magnusson wrote:
> >> With this patch applied you don't need to enable bindv6only system wide
> >> to use IPv6 with Yxa on Linux as described in the README file. Some
> >> programs, such as some versions of the SUN Java jre/plug-in, are
> >> incompatible with the bindv6only setting, which makes this patch useful
> >> when using both Java and Yxa with IPv6 enabled on the same Linux system.
> > 
> > Attached is an updated patch which hopefully also works on other systems
> > than Linux. The last patch was supposed to be portable, but a line was
> > commented out by mistake.
> Can you please comment some on how this works? I can't find 
> documentation about the {raw, _, _, _} socket option - is it correct 
> that it is undocumented?

Raw socket options are documented in inet[1].

> Where does the IPPROTO_IPV6 = 41 and IPV6_V6ONLY = 26 values come from? 
> Somewhere in the Linux kernel header files I guess, but I would like to 
> document that somewhere in case Linux changes this sometime in the future.

They are available both in libc6-dev (source package glibc), and
linux-libc-dev (source package linux) on my Ubuntu system. 

IPPROTO_IPv6 = 41 is located in 
* /usr/include/linux/in.h from linux-libc-dev
* /usr/include/netinet/in.h from libc6-dev

and IPV6_V6ONLY = 26 in
* /usr/include/linux/in6.h from linux-libc-dev
* /usr/include/bits/in.h from libc6-dev

And according to RFC 3493[2]:

    The declaration for IPPROTO_IPV6, the new IPv6 socket options, and
    related constants defined in this section are obtained by including
    the header <netinet/in.h>.

> I'm also thinking that perhaps it is best to put this code in a separate 
> file, in case this opens up the door to more complex OS depending stuff 
> in the future...
> /Fredrik

Or maybe IPPROTO_IPV6 and IPV6_V6ONLY could be autodetected in


[1] http://erlang.org/doc/man/inet.html
[2] http://tools.ietf.org/html/rfc3493#section-5

Yxa-devel mailing list

Reply via email to