Adding getaddrinfo and checked command-line parameters