Date: Sat, 14 Jul 2001 13:49:55 +0200 From: Bernd Walter <ticso@mail.cicely.de> To: freebsd-net@freebsd.org Subject: how to get AF_LOCAL from getaddrinfo() Message-ID: <20010714134954.A23031@cicely20.cicely.de>
next in thread | raw e-mail | index | archive | help
I'm doing the following:
[...]
int res;
struct addrinfo *info;
struct addrinfo hints;
bzero(&hints, sizeof(hints));
hints.ai_flags = AI_PASSIVE;
hints.ai_socktype = SOCK_STREAM;
hints.ai_family = AF_UNSPEC;
res = getaddrinfo(ip, portname, &hints, &info);
if (res != 0) {
fprintf(stderr, "getaddrinfo failed: %s\n",
gai_strerror(res));
exit(1);
}
[...]
ip = "/var/run/something"; portname = "/local";
results in:
getaddrinfo failed: servname not supported for ai_socktype
ip = "/var/run/something"; portname = NULL;
results in:
getaddrinfo failed: No address associated with hostname
ip = "/var/run/something"; portname = NULL; hints.ai_family = AF_LOCAL
results in:
getaddrinfo failed: ai_family not supported
--
B.Walter COSMO-Project http://www.cosmo-project.de
ticso@cicely.de Usergroup info@cosmo-project.de
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010714134954.A23031>
