AFAICT this file already supports everything we need for IPv6 (which is really just decoding IPv6). Some tests for that would be good, of course, so I added some TODOs to the test.