move sockaddr types to generic code