diff options
author | guenther <> | 2016-05-29 06:01:24 +0000 |
---|---|---|
committer | guenther <> | 2016-05-29 06:01:24 +0000 |
commit | 6d3f97653643f87c10a6b6803e3ed40945fbf56c (patch) | |
tree | 197e7dbc67286aa338094bbd003e6389993c9054 /src/lib | |
parent | 6b8904c308ff1f5dc15ac3f8dcfeffdd1609f4ce (diff) | |
download | openbsd-6d3f97653643f87c10a6b6803e3ed40945fbf56c.tar.gz openbsd-6d3f97653643f87c10a6b6803e3ed40945fbf56c.tar.bz2 openbsd-6d3f97653643f87c10a6b6803e3ed40945fbf56c.zip |
Prefer AF_* over PF_* and 'address family' over 'protocol family'
ok jung@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3 index 558b5e1596..35ba3e9c35 100644 --- a/src/lib/libc/net/getaddrinfo.3 +++ b/src/lib/libc/net/getaddrinfo.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getaddrinfo.3,v 1.57 2015/02/16 18:26:56 jca Exp $ | 1 | .\" $OpenBSD: getaddrinfo.3,v 1.58 2016/05/29 06:01:24 guenther Exp $ |
2 | .\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $ | 2 | .\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") | 4 | .\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") |
@@ -16,7 +16,7 @@ | |||
16 | .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | 16 | .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
17 | .\" PERFORMANCE OF THIS SOFTWARE. | 17 | .\" PERFORMANCE OF THIS SOFTWARE. |
18 | .\" | 18 | .\" |
19 | .Dd $Mdocdate: February 16 2015 $ | 19 | .Dd $Mdocdate: May 29 2016 $ |
20 | .Dt GETADDRINFO 3 | 20 | .Dt GETADDRINFO 3 |
21 | .Os | 21 | .Os |
22 | .Sh NAME | 22 | .Sh NAME |
@@ -74,7 +74,7 @@ as defined by | |||
74 | .Bd -literal | 74 | .Bd -literal |
75 | struct addrinfo { | 75 | struct addrinfo { |
76 | int ai_flags; /* input flags */ | 76 | int ai_flags; /* input flags */ |
77 | int ai_family; /* protocol family for socket */ | 77 | int ai_family; /* address family for socket */ |
78 | int ai_socktype; /* socket type */ | 78 | int ai_socktype; /* socket type */ |
79 | int ai_protocol; /* protocol for socket */ | 79 | int ai_protocol; /* protocol for socket */ |
80 | socklen_t ai_addrlen; /* length of socket-address */ | 80 | socklen_t ai_addrlen; /* length of socket-address */ |
@@ -90,12 +90,12 @@ The caller can supply the following structure elements in | |||
90 | .Fa hints : | 90 | .Fa hints : |
91 | .Bl -tag -width "ai_socktypeXX" | 91 | .Bl -tag -width "ai_socktypeXX" |
92 | .It Fa ai_family | 92 | .It Fa ai_family |
93 | The protocol family that should be used. | 93 | The address family that should be used. |
94 | When | 94 | When |
95 | .Fa ai_family | 95 | .Fa ai_family |
96 | is set to | 96 | is set to |
97 | .Dv PF_UNSPEC , | 97 | .Dv AF_UNSPEC , |
98 | it means the caller will accept any protocol family supported by the | 98 | it means the caller will accept any address family supported by the |
99 | operating system. | 99 | operating system. |
100 | .It Fa ai_socktype | 100 | .It Fa ai_socktype |
101 | Denotes the type of socket that is wanted: | 101 | Denotes the type of socket that is wanted: |
@@ -229,7 +229,7 @@ behaves as if the caller provided a | |||
229 | with | 229 | with |
230 | .Fa ai_family | 230 | .Fa ai_family |
231 | set to | 231 | set to |
232 | .Dv PF_UNSPEC , | 232 | .Dv AF_UNSPEC , |
233 | .Fa ai_flags | 233 | .Fa ai_flags |
234 | set to | 234 | set to |
235 | .Dv AI_ADDRCONFIG , | 235 | .Dv AI_ADDRCONFIG , |
@@ -351,7 +351,7 @@ int s; | |||
351 | const char *cause = NULL; | 351 | const char *cause = NULL; |
352 | 352 | ||
353 | memset(&hints, 0, sizeof(hints)); | 353 | memset(&hints, 0, sizeof(hints)); |
354 | hints.ai_family = PF_UNSPEC; | 354 | hints.ai_family = AF_UNSPEC; |
355 | hints.ai_socktype = SOCK_STREAM; | 355 | hints.ai_socktype = SOCK_STREAM; |
356 | error = getaddrinfo("www.kame.net", "www", &hints, &res0); | 356 | error = getaddrinfo("www.kame.net", "www", &hints, &res0); |
357 | if (error) | 357 | if (error) |
@@ -393,7 +393,7 @@ int nsock; | |||
393 | const char *cause = NULL; | 393 | const char *cause = NULL; |
394 | 394 | ||
395 | memset(&hints, 0, sizeof(hints)); | 395 | memset(&hints, 0, sizeof(hints)); |
396 | hints.ai_family = PF_UNSPEC; | 396 | hints.ai_family = AF_UNSPEC; |
397 | hints.ai_socktype = SOCK_STREAM; | 397 | hints.ai_socktype = SOCK_STREAM; |
398 | hints.ai_flags = AI_PASSIVE; | 398 | hints.ai_flags = AI_PASSIVE; |
399 | error = getaddrinfo(NULL, "www", &hints, &res0); | 399 | error = getaddrinfo(NULL, "www", &hints, &res0); |