diff options
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/net/gai_strerror.3 | 90 | 
1 files changed, 90 insertions, 0 deletions
| diff --git a/src/lib/libc/net/gai_strerror.3 b/src/lib/libc/net/gai_strerror.3 new file mode 100644 index 0000000000..7e121b4482 --- /dev/null +++ b/src/lib/libc/net/gai_strerror.3 | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | .\" $OpenBSD: gai_strerror.3,v 1.3 2004/12/20 19:22:16 millert Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") | ||
| 4 | .\" Copyright (C) 2000, 2001 Internet Software Consortium. | ||
| 5 | .\" | ||
| 6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 8 | .\" copyright notice and this permission notice appear in all copies. | ||
| 9 | .\" | ||
| 10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH | ||
| 11 | .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
| 12 | .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
| 13 | .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| 14 | .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | ||
| 15 | .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
| 16 | .\" PERFORMANCE OF THIS SOFTWARE. | ||
| 17 | .\" | ||
| 18 | .Dd December 20, 2004 | ||
| 19 | .Dt GAI_STRERROR 3 | ||
| 20 | .Os | ||
| 21 | .Sh NAME | ||
| 22 | .Nm gai_strerror | ||
| 23 | .Nd get error message string from EAI_xxx error code | ||
| 24 | .Sh SYNOPSIS | ||
| 25 | .Fd #include <sys/types.h> | ||
| 26 | .Fd #include <sys/socket.h> | ||
| 27 | .Fd #include <netdb.h> | ||
| 28 | .Ft "const char *" | ||
| 29 | .Fn gai_strerror "int ecode" | ||
| 30 | .Sh DESCRIPTION | ||
| 31 | .Fn gai_strerror | ||
| 32 | returns an error message string corresponding to the error code returned by | ||
| 33 | .Xr getaddrinfo 3 | ||
| 34 | or | ||
| 35 | .Xr getnameinfo 3 . | ||
| 36 | .Pp | ||
| 37 | The following error codes and their meaning are defined in | ||
| 38 | .Aq Pa netdb.h : | ||
| 39 | .Pp | ||
| 40 | .Bl -tag -width "EAI_ADDRFAMILYXX" -offset indent -compact | ||
| 41 | .It Dv EAI_ADDRFAMILY | ||
| 42 | address family for | ||
| 43 | .Fa hostname | ||
| 44 | not supported | ||
| 45 | .It Dv EAI_AGAIN | ||
| 46 | temporary failure in name resolution | ||
| 47 | .It Dv EAI_BADFLAGS | ||
| 48 | invalid value for | ||
| 49 | .Fa ai_flags | ||
| 50 | .It Dv EAI_BADHINTS | ||
| 51 | invalid value for | ||
| 52 | .Fa hints | ||
| 53 | .It Dv EAI_FAIL | ||
| 54 | non-recoverable failure in name resolution | ||
| 55 | .It Dv EAI_FAMILY | ||
| 56 | .Fa ai_family | ||
| 57 | not supported. | ||
| 58 | .It Dv EAI_MEMORY | ||
| 59 | memory allocation failure | ||
| 60 | .It Dv EAI_NODATA | ||
| 61 | no address associated with | ||
| 62 | .Fa hostname | ||
| 63 | .It Dv EAI_NONAME | ||
| 64 | .Fa hostname | ||
| 65 | or | ||
| 66 | .Fa servname | ||
| 67 | not provided, or not known | ||
| 68 | .It Dv EAI_PROTOCOL | ||
| 69 | resolved protocol is unknown | ||
| 70 | .It Dv EAI_SERVICE | ||
| 71 | .Fa servname | ||
| 72 | not supported for | ||
| 73 | .Fa ai_socktype | ||
| 74 | .It Dv EAI_SOCKTYPE | ||
| 75 | .Fa ai_socktype | ||
| 76 | not supported | ||
| 77 | .It Dv EAI_SYSTEM | ||
| 78 | system error returned in | ||
| 79 | .Va errno | ||
| 80 | .El | ||
| 81 | .Sh RETURN VALUES | ||
| 82 | .Fn gai_strerror | ||
| 83 | returns a pointer to the error message string corresponding to | ||
| 84 | .Fa ecode . | ||
| 85 | If | ||
| 86 | .Fa ecode | ||
| 87 | is out of range, an implementation-specific error message string is returned. | ||
| 88 | .Sh SEE ALSO | ||
| 89 | .Xr getaddrinfo 3 , | ||
| 90 | .Xr getnameinfo 3 | ||
