From: Michael S. Tsirkin Date: Mon, 07 May 2007 04:54:52 GMT Subject: Re: [PATCH] connect: display connection progress Message-ID: <20070507045451.GE30339@mellanox.co.il> In-Reply-To: <20070506222123.GB2439@steel.home> > @@ -511,10 +537,19 @@ static int git_tcp_connect_sock(char *host) > > if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) { > saved_errno = errno; > + fprintf(stderr, "%s[%d: %s]: net=%s, errno=%s\n", > + host, > + cnt, > + inet_ntoa(*(struct in_addr *)&sa.sin_addr), > + hstrerror(h_errno), > + strerror(saved_errno)); > close(sockfd); > sockfd = -1; > continue; > } > + fprintf(stderr, "using %s[%s]\n", > + host, > + inet_ntoa(*(struct in_addr *)&sa.sin_addr)); > break; > } My manual says: The inet_ntoa() function shall convert the Internet host address specified by in to a string in the Internet standard dot notation. does it work for IPv6? -- MST