>> The following flags are added for the ai_flags in addrinfo data >> structure defined in Basic IPv6 Socket API Extension [2]. >> >> AI_PREFER_SRC_HOME >> AI_PREFER_SRC_COA >> AI_PREFER_SRC_TMP >> AI_PREFER_SRC_PUBLIC >> AI_PREFER_SRC_CGA >> AI_PREFER_SRC_NONCGA >=> why _SRC_ ?
I don't understand how can flags to getaddrinfo(3) affect source address selection. where does it take effect in the following code? itojun error = getaddrinfo(host, serv, &hints, &res); s = -1; for (ai = res; ai; ai = ai->ai_next) { s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (s < 0) continue; if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) { close(s); s = -1; continue; } break; } if (s < 0) exit(1); /* we have a socket */ -------------------------------------------------------------------- IETF IPng Working Group Mailing List IPng Home Page: http://playground.sun.com/ipng FTP archive: ftp://playground.sun.com/pub/ipng Direct all administrative requests to [EMAIL PROTECTED] --------------------------------------------------------------------