Tips / Tricks (3) check if user-provided address is well-formed? call getaddrinfo() with AI_NUMERICHOST you can check address family as well