squid IPv6 patch

From: Roger Venning <r.venning@dont-contact.us>
Date: Fri, 08 Dec 2000 17:24:33 +1100

Greetings again, all,

thanks for the responses to my previous question. This time
the request is quite different. To ease myself back into squid
development (I had formely done work on a 'central squid server'
concept), I made squid mostly IPv6 aware squid. (Warning: this
code compiles, and starts... no further testing has yet been done).

This mail is to solicit comments/critiques/flames :-) on the
coding approach to the patch (look at sourceforge CVS 'ipv6' tag).
In brief, I have #ifdef INET6 in src/define.h, and everything else
is untouched by #ifdefs, except that code now reads like

struct SOCKADDR_IN foo;
struct IN_ADDR bar;
bar = SAFE_INET_ADDR(astring);
if (!ADDR_IS_NOADDR(bar)) {
         ADDR_FROM_SA(foo) = bar;
} else barf();
for a very contrived example...

I also have a few questions for the guru's: do any recent systems
use the internal DNS code in squid? Or could I presume that if your
boxen have IPv6, then the system libraries will be used for gethostby*?

On a similar note, I noticed the xmemcpy et.al wrappers, however
I note that md5.c has a naked memcmp... so does this mean that
everyone is using systems that don't have oddities like bcopy?

Finally, do people have thoughts about the long term overhead of
using IPv4 mapped (32 bytes IPv4 addr in 128 bit IPv6 storage
location)... is it really an issue? I have seen code that throws
around sockaddr_storage structures, which contains the address family,
everywhere. This way that save just a few bytes at the cost of
much more complexity...

Roger.

-------------------------------------------------------------
Roger Venning \ Do not go gentle into that good night
Melbourne \ Rage, rage against the dying of the light.
Australia <r.venning@bipond.com> Dylan Thomas
Received on Thu Dec 07 2000 - 07:23:37 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:02 MST