net: Split makesock(), part 1: Introduce lookup_address().