Unified code base for IPv4 and IPv6

This is a more pragmatic approach for the unified code base improving
over the previous attempt.