IPv4 parsing code