Extract ip functions to ip address util.