diff options
author | dlg <> | 2005-07-05 22:21:16 +0000 |
---|---|---|
committer | dlg <> | 2005-07-05 22:21:16 +0000 |
commit | 39bb14827920f2df6ef79ef2646a815ff17ff665 (patch) | |
tree | 5d96cac1a1a3a156866b27ec99b0b9d02eccf9ff /src | |
parent | 4ae8b12ec2987c0437176526df011210608473e7 (diff) | |
download | openbsd-39bb14827920f2df6ef79ef2646a815ff17ff665.tar.gz openbsd-39bb14827920f2df6ef79ef2646a815ff17ff665.tar.bz2 openbsd-39bb14827920f2df6ef79ef2646a815ff17ff665.zip |
use "www" as the service name in the example instead of "http" since "www"
is what is used in /etc/services.
ok jmc@ henning@ millert@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3 index b82dda5937..7c3bfe40d7 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.40 2005/03/12 00:02:07 claudio Exp $ | 1 | .\" $OpenBSD: getaddrinfo.3,v 1.41 2005/07/05 22:21:16 dlg 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") |
@@ -288,7 +288,7 @@ structure(s). | |||
288 | The following code tries to connect to | 288 | The following code tries to connect to |
289 | .Dq Li www.kame.net | 289 | .Dq Li www.kame.net |
290 | service | 290 | service |
291 | .Dq Li http | 291 | .Dq Li www |
292 | via a stream socket. | 292 | via a stream socket. |
293 | It loops through all the addresses available, regardless of address family. | 293 | It loops through all the addresses available, regardless of address family. |
294 | If the destination resolves to an IPv4 address, it will use an | 294 | If the destination resolves to an IPv4 address, it will use an |
@@ -310,7 +310,7 @@ const char *cause = NULL; | |||
310 | memset(&hints, 0, sizeof(hints)); | 310 | memset(&hints, 0, sizeof(hints)); |
311 | hints.ai_family = PF_UNSPEC; | 311 | hints.ai_family = PF_UNSPEC; |
312 | hints.ai_socktype = SOCK_STREAM; | 312 | hints.ai_socktype = SOCK_STREAM; |
313 | error = getaddrinfo("www.kame.net", "http", &hints, &res0); | 313 | error = getaddrinfo("www.kame.net", "www", &hints, &res0); |
314 | if (error) { | 314 | if (error) { |
315 | errx(1, "%s", gai_strerror(error)); | 315 | errx(1, "%s", gai_strerror(error)); |
316 | /*NOTREACHED*/ | 316 | /*NOTREACHED*/ |
@@ -341,7 +341,7 @@ freeaddrinfo(res0); | |||
341 | .Ed | 341 | .Ed |
342 | .Pp | 342 | .Pp |
343 | The following example tries to open a wildcard listening socket onto service | 343 | The following example tries to open a wildcard listening socket onto service |
344 | .Dq Li http , | 344 | .Dq Li www , |
345 | for all the address families available. | 345 | for all the address families available. |
346 | .Bd -literal -offset indent | 346 | .Bd -literal -offset indent |
347 | struct addrinfo hints, *res, *res0; | 347 | struct addrinfo hints, *res, *res0; |
@@ -354,7 +354,7 @@ memset(&hints, 0, sizeof(hints)); | |||
354 | hints.ai_family = PF_UNSPEC; | 354 | hints.ai_family = PF_UNSPEC; |
355 | hints.ai_socktype = SOCK_STREAM; | 355 | hints.ai_socktype = SOCK_STREAM; |
356 | hints.ai_flags = AI_PASSIVE; | 356 | hints.ai_flags = AI_PASSIVE; |
357 | error = getaddrinfo(NULL, "http", &hints, &res0); | 357 | error = getaddrinfo(NULL, "www", &hints, &res0); |
358 | if (error) { | 358 | if (error) { |
359 | errx(1, "%s", gai_strerror(error)); | 359 | errx(1, "%s", gai_strerror(error)); |
360 | /*NOTREACHED*/ | 360 | /*NOTREACHED*/ |