> I, for example, want to know if two addresses are the same. With IPv4 I look at them, do strcmp or simple 32 bit integer arithmetic; with IPv6 I have do do a massively complex normalisation step first then line them up on paper and use my fingers.
It's interesting how wrong this actually is. Here's a list of v4 addresses -- every single one of these refers to the exact same IP:
strcmp() ain't gonna help you here. v6 is pretty simple in comparison; here's a roughly equivalent address and its variations:
That's pretty short, and it's a lot easier to compare in your head too. (For instance, how many of you noticed that I made a mistake in my v4 list above? Some of those addresses aren't equivalent! Even now that I've straight up told you, how many of you can spot the mistake easily?)
In case anybody is wondering, the "massively complex normalisation step" that Adam referred to consists of calling getaddrinfo() on the address. That's, er, basically it.