convert ip2hex and hex2ip