Re: [Yxa-devel] [patch] Enable IPV6_V6ONLY on IPv6 sockets on Linux

2009-08-26 Thread Fredrik Thulin
On Sat, 2009-04-25 at 20:47 +0200, Mikael Magnusson wrote:
> On Thu, 2009-04-23 at 09:58 +0200, Fredrik Thulin wrote:
> > Mikael Magnusson wrote:
> > > On Mon, 2009-04-20 at 19:26 +0200, Fredrik Thulin wrote:
> > >> Mikael Magnusson wrote:

Applied, thanks. r1718.

/Fredrik


___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


Re: [Yxa-devel] [patch] Enable IPV6_V6ONLY on IPv6 sockets on Linux

2009-04-25 Thread Mikael Magnusson
On Thu, 2009-04-23 at 09:58 +0200, Fredrik Thulin wrote:
> Mikael Magnusson wrote:
> > On Mon, 2009-04-20 at 19:26 +0200, Fredrik Thulin wrote:
> >> Mikael Magnusson wrote:

> >> 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 .
> > 
> >> 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
> > configure.ac?
> 
> I was thinking something similar as well. I'm not sure now though - I 
> would rather not have YXA depend on libc6-dev and linux-libc-dev (or 
> equivalent) just for this.
> 
> /Fredrik

You only need one of the packages, and I think YXA already depends on
libc6-dev for building the syslog_c-port program.

/Mikael

___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


Re: [Yxa-devel] [patch] Enable IPV6_V6ONLY on IPv6 sockets on Linux

2009-04-23 Thread Fredrik Thulin
Mikael Magnusson wrote:
> 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].

Right. I had old man-pages installed (I think R12B-1, which don't 
mention 'raw' but the ubuntu package erlang-manpages gave me R12B-3 
which has 'raw').

>> 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 .
> 
>> 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
> configure.ac?

I was thinking something similar as well. I'm not sure now though - I 
would rather not have YXA depend on libc6-dev and linux-libc-dev (or 
equivalent) just for this.

/Fredrik
___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


Re: [Yxa-devel] [patch] Enable IPV6_V6ONLY on IPv6 sockets on Linux

2009-04-21 Thread Mikael Magnusson
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 .

> 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
configure.ac?

/Mikael

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

___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


Re: [Yxa-devel] [patch] Enable IPV6_V6ONLY on IPv6 sockets on Linux

2009-04-20 Thread Fredrik Thulin
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?

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.

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
___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


Re: [Yxa-devel] [patch] Enable IPV6_V6ONLY on IPv6 sockets on Linux

2009-04-06 Thread Mikael Magnusson
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.

/Mikael



ipv6_v6only.dpatch
Description: application/shellscript
___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel


[Yxa-devel] [patch] Enable IPV6_V6ONLY on IPv6 sockets on Linux

2009-04-06 Thread Mikael Magnusson
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.

Regards,
Mikael



ipv6_v6only.dpatch
Description: application/shellscript
___
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel