On Thu, 2009-02-12 at 14:45 +1300, Ian Batterbee wrote:
But wasn't there a big discussion at NZNOG about how applications shouldn't know anything (or care) about the underlying communication protocols being used ?
Yes, and wouldn't it be nice if *libc* didn't want applications to make different calls when using IPv6 addresses vs. IPv4 addresses? So while that's a great theory it first needs people to write libraries that deal with these addresses without having to consider what form they are. One common approach seems to be to switch the application to handle all addresses as IPv6 addresses, mapping IPv4 addresses into their 6-to-4 equivalents. Of course you may still have to maintain an additional bit of information as to whether this is *really* IPv4 or IPv6, but hopefully that can be inside the library rather than outside it, and given the nature of 6-to-4 it can even be stored within the mapped address itself. I believe this is the best approach. Subtleties of behaviour also have effects. An example of one that bit me, is that the Undernet IRC server considers 1 IPv4 address equivalent to 1 IPv6 /64 for rate limiting purposes. While this kind of heuristic works OK with the same values for private and public servers both on NATed LANs and the intartubes for IPv4, for IPv6 everyone on your LAN connecting to your private IRC server will have an IPv6 in the same /64 and rate limiting will kick in unless you completely change the rate limiting values. So that is an example of an application which *needs* to know the type of address in order to be able to make the correct decision. Regards, Andrew McMillan. ------------------------------------------------------------------------ andrew (AT) morphoss (DOT) com +64(272)DEBIAN You can rent this space for only $5 a week. ------------------------------------------------------------------------