[torquedev] IPv6 configuration
Adrian Knoth
adi at drcomp.erfurt.thur.de
Thu May 22 06:14:26 MDT 2008
On Thu, May 08, 2008 at 11:49:51PM +0200, Matti Bickel wrote:
> AF_UNIX). This basically means all library code is sa_family_t aware and
> the main server/mom code just needs to pass the right parameter.
>
> However *somewhere* this parameter needs to be determined. And i'm
> wondering how. In light of what other programs with IPv4/6 capabilities
> do, i could
>
> * add --4, --6, --4only, --6only commandline switches to let the user
> select if he prefers IPv4, IPv6 or wants one of them exclusively
>
> * add a configuration parameter to the torque config files
>
> * do something entirely different like starting as much as i can, given
> the underlying system
>From my point of view, we're talking about middleware, so the user might
not see it at all.
The basic approach would be: ask the DNS resolver and loop over the list
of returned addresses. This usually involves a preference for IPv6,
which is perfectly right, but can be tuned system-wide via gai.conf
(glibc) or somewhere else (i.e. Vista registry key).
In other words: think of ssh, where the goal is a single connection.
Adding "-4" and "-6" is so simple, depending on the parameter you just
don't ask for AF_UNSPEC, but AF_INET or AF_INET6. Feel free to write
those ten lines of code to gain a little more control. For testing
purpose, you would need that anyway.
> I can see the pros/cons of each of the three proposals, but unsure which
> is the torque way to go for this.
"Do the right thing" (read: should work out of the box) is always a good
approach for software behaviour ;)
--
mail: adi at thur.de http://adi.thur.de PGP/GPG: key via keyserver
I used to drive a Heisenbergmobile, but every time I looked at the
speedometer, I got lost. (old joke, seen in de.talk.jokes)
More information about the torquedev
mailing list