> + proto = 4; I find it confusing for that to mean IPv6. I suppose there is prior usage for the v4->2, v6->4 mapping, but I feel that line needs a comment to the effect that proto = 4 selects IPv6.