summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorguenther <>2016-05-29 06:01:24 +0000
committerguenther <>2016-05-29 06:01:24 +0000
commit6d3f97653643f87c10a6b6803e3ed40945fbf56c (patch)
tree197e7dbc67286aa338094bbd003e6389993c9054 /src/lib
parent6b8904c308ff1f5dc15ac3f8dcfeffdd1609f4ce (diff)
downloadopenbsd-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.318
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
75struct addrinfo { 75struct 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
93The protocol family that should be used. 93The address family that should be used.
94When 94When
95.Fa ai_family 95.Fa ai_family
96is set to 96is set to
97.Dv PF_UNSPEC , 97.Dv AF_UNSPEC ,
98it means the caller will accept any protocol family supported by the 98it means the caller will accept any address family supported by the
99operating system. 99operating system.
100.It Fa ai_socktype 100.It Fa ai_socktype
101Denotes the type of socket that is wanted: 101Denotes the type of socket that is wanted:
@@ -229,7 +229,7 @@ behaves as if the caller provided a
229with 229with
230.Fa ai_family 230.Fa ai_family
231set to 231set to
232.Dv PF_UNSPEC , 232.Dv AF_UNSPEC ,
233.Fa ai_flags 233.Fa ai_flags
234set to 234set to
235.Dv AI_ADDRCONFIG , 235.Dv AI_ADDRCONFIG ,
@@ -351,7 +351,7 @@ int s;
351const char *cause = NULL; 351const char *cause = NULL;
352 352
353memset(&hints, 0, sizeof(hints)); 353memset(&hints, 0, sizeof(hints));
354hints.ai_family = PF_UNSPEC; 354hints.ai_family = AF_UNSPEC;
355hints.ai_socktype = SOCK_STREAM; 355hints.ai_socktype = SOCK_STREAM;
356error = getaddrinfo("www.kame.net", "www", &hints, &res0); 356error = getaddrinfo("www.kame.net", "www", &hints, &res0);
357if (error) 357if (error)
@@ -393,7 +393,7 @@ int nsock;
393const char *cause = NULL; 393const char *cause = NULL;
394 394
395memset(&hints, 0, sizeof(hints)); 395memset(&hints, 0, sizeof(hints));
396hints.ai_family = PF_UNSPEC; 396hints.ai_family = AF_UNSPEC;
397hints.ai_socktype = SOCK_STREAM; 397hints.ai_socktype = SOCK_STREAM;
398hints.ai_flags = AI_PASSIVE; 398hints.ai_flags = AI_PASSIVE;
399error = getaddrinfo(NULL, "www", &hints, &res0); 399error = getaddrinfo(NULL, "www", &hints, &res0);