diff options
author | ume <ume@FreeBSD.org> | 2015-12-20 15:18:50 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2015-12-20 15:18:50 +0000 |
commit | 33741c0d9ada9a85f36241592179ac7ca0b53436 (patch) | |
tree | 99b412052718be3e4bd19d8e3f23eb6ae3ef6855 /lib/libc/net/getaddrinfo.3 | |
parent | 1e23428c2e6763bb7094f632ed24f87120a89475 (diff) | |
download | FreeBSD-src-33741c0d9ada9a85f36241592179ac7ca0b53436.zip FreeBSD-src-33741c0d9ada9a85f36241592179ac7ca0b53436.tar.gz |
addrinfo.ai_family is an address family, not a protocol family.
PR: 162434
MFC after: 1 week
Diffstat (limited to 'lib/libc/net/getaddrinfo.3')
-rw-r--r-- | lib/libc/net/getaddrinfo.3 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 69601e6..7380428 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 19, 2015 +.Dd December 21, 2015 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -79,7 +79,7 @@ as defined by .Bd -literal struct addrinfo { int ai_flags; /* input flags */ - int ai_family; /* protocol family for socket */ + int ai_family; /* address family for socket */ int ai_socktype; /* socket type */ int ai_protocol; /* protocol for socket */ socklen_t ai_addrlen; /* length of socket-address */ @@ -95,12 +95,12 @@ The caller can supply the following structure elements in .Fa hints : .Bl -tag -width "ai_socktypeXX" .It Fa ai_family -The protocol family that should be used. +The address family that should be used. When .Fa ai_family is set to -.Dv PF_UNSPEC , -it means the caller will accept any protocol family supported by the +.Dv AF_UNSPEC , +it means the caller will accept any address family supported by the operating system. .It Fa ai_socktype Denotes the type of socket that is wanted: @@ -268,7 +268,7 @@ behaves as if the caller provided a with .Fa ai_family set to -.Dv PF_UNSPEC +.Dv AF_UNSPEC and all other elements set to zero or .Dv NULL . .Pp @@ -380,7 +380,7 @@ int s; const char *cause = NULL; memset(&hints, 0, sizeof(hints)); -hints.ai_family = PF_UNSPEC; +hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("www.kame.net", "http", &hints, &res0); if (error) { @@ -423,7 +423,7 @@ int nsock; const char *cause = NULL; memset(&hints, 0, sizeof(hints)); -hints.ai_family = PF_UNSPEC; +hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; error = getaddrinfo(NULL, "http", &hints, &res0); |