Char: merge ip2main and ip2base