diff options
Diffstat (limited to 'src/lib/libc/net/getaddrinfo.3')
| -rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 531 |
1 files changed, 0 insertions, 531 deletions
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3 deleted file mode 100644 index e74fdf6ed7..0000000000 --- a/src/lib/libc/net/getaddrinfo.3 +++ /dev/null | |||
| @@ -1,531 +0,0 @@ | |||
| 1 | .\" $OpenBSD: getaddrinfo.3,v 1.29 2004/12/06 10:46:35 jmc Exp $ | ||
| 2 | .\" $KAME: getaddrinfo.3,v 1.29 2001/02/12 09:24:45 itojun Exp $ | ||
| 3 | .\" | ||
| 4 | .\" Copyright (c) 1983, 1987, 1991, 1993 | ||
| 5 | .\" The Regents of the University of California. All rights reserved. | ||
| 6 | .\" | ||
| 7 | .\" Redistribution and use in source and binary forms, with or without | ||
| 8 | .\" modification, are permitted provided that the following conditions | ||
| 9 | .\" are met: | ||
| 10 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 11 | .\" notice, this list of conditions and the following disclaimer. | ||
| 12 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | .\" notice, this list of conditions and the following disclaimer in the | ||
| 14 | .\" documentation and/or other materials provided with the distribution. | ||
| 15 | .\" 3. Neither the name of the University nor the names of its contributors | ||
| 16 | .\" may be used to endorse or promote products derived from this software | ||
| 17 | .\" without specific prior written permission. | ||
| 18 | .\" | ||
| 19 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 20 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 21 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 22 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 23 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 24 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 25 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 26 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 29 | .\" SUCH DAMAGE. | ||
| 30 | .\" | ||
| 31 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 | ||
| 32 | .\" | ||
| 33 | .Dd May 25, 1995 | ||
| 34 | .Dt GETADDRINFO 3 | ||
| 35 | .Os | ||
| 36 | .\" | ||
| 37 | .Sh NAME | ||
| 38 | .Nm getaddrinfo , | ||
| 39 | .Nm freeaddrinfo | ||
| 40 | .Nd nodename-to-address translation in protocol-independent manner | ||
| 41 | .\" | ||
| 42 | .Sh SYNOPSIS | ||
| 43 | .Fd #include <sys/types.h> | ||
| 44 | .Fd #include <sys/socket.h> | ||
| 45 | .Fd #include <netdb.h> | ||
| 46 | .Ft int | ||
| 47 | .Fn getaddrinfo "const char *nodename" "const char *servname" \ | ||
| 48 | "const struct addrinfo *hints" "struct addrinfo **res" | ||
| 49 | .Ft void | ||
| 50 | .Fn freeaddrinfo "struct addrinfo *ai" | ||
| 51 | .\" | ||
| 52 | .Sh DESCRIPTION | ||
| 53 | The | ||
| 54 | .Fn getaddrinfo | ||
| 55 | function is defined for protocol-independent nodename-to-address translation. | ||
| 56 | It performs the functionality of | ||
| 57 | .Xr gethostbyname 3 | ||
| 58 | and | ||
| 59 | .Xr getservbyname 3 , | ||
| 60 | but in a more sophisticated manner. | ||
| 61 | .Pp | ||
| 62 | All of the information returned by | ||
| 63 | .Fn getaddrinfo | ||
| 64 | is dynamically allocated: | ||
| 65 | the | ||
| 66 | .Li addrinfo | ||
| 67 | structures, the socket address structures, and canonical node name | ||
| 68 | strings pointed to by the addrinfo structures. | ||
| 69 | To return this information to the system the function | ||
| 70 | .Fn freeaddrinfo | ||
| 71 | is called. | ||
| 72 | The | ||
| 73 | .Fa addrinfo | ||
| 74 | structure pointed to by the | ||
| 75 | .Fa ai | ||
| 76 | argument is freed, | ||
| 77 | along with any dynamic storage pointed to by the structure. | ||
| 78 | This operation is repeated until a | ||
| 79 | .Dv NULL | ||
| 80 | .Fa ai_next | ||
| 81 | pointer is encountered. | ||
| 82 | .Pp | ||
| 83 | To aid applications in printing error messages based on the | ||
| 84 | .Dv EAI_xxx | ||
| 85 | codes returned by | ||
| 86 | .Fn getaddrinfo , | ||
| 87 | .Fn gai_strerror | ||
| 88 | is defined. | ||
| 89 | See | ||
| 90 | .Xr gai_strerror 3 | ||
| 91 | for more information. | ||
| 92 | .Pp | ||
| 93 | The implementation allows experimental numeric IPv6 address notation with | ||
| 94 | scope identifier. | ||
| 95 | By appending the percent character and scope identifier to addresses, | ||
| 96 | you can fill the | ||
| 97 | .Li sin6_scope_id | ||
| 98 | field for addresses. | ||
| 99 | This would make management of scoped address easier, | ||
| 100 | and allows cut-and-paste input of scoped address. | ||
| 101 | .Pp | ||
| 102 | At this moment the code supports only link-local addresses with the format. | ||
| 103 | Scope identifier is hardcoded to the name of the hardware interface associated | ||
| 104 | with the link | ||
| 105 | .Po | ||
| 106 | such as | ||
| 107 | .Li ne0 | ||
| 108 | .Pc . | ||
| 109 | An example is | ||
| 110 | .Dq Li fe80::1%ne0 , | ||
| 111 | which means | ||
| 112 | .Do | ||
| 113 | .Li fe80::1 | ||
| 114 | on the link associated with the | ||
| 115 | .Li ne0 | ||
| 116 | interface | ||
| 117 | .Dc . | ||
| 118 | .Pp | ||
| 119 | The IPv6 implementation is still very experimental and non-standard. | ||
| 120 | The current implementation assumes a one-to-one relationship between | ||
| 121 | the interface and link, which is not necessarily true from the specification. | ||
| 122 | .Pp | ||
| 123 | The | ||
| 124 | .Li addrinfo | ||
| 125 | structure is defined as a result of including the | ||
| 126 | .Aq Pa netdb.h | ||
| 127 | header: | ||
| 128 | .Bd -literal | ||
| 129 | struct addrinfo { | ||
| 130 | int ai_flags; /* input flags */ | ||
| 131 | int ai_family; /* protocol family for socket */ | ||
| 132 | int ai_socktype; /* socket type */ | ||
| 133 | int ai_protocol; /* protocol for socket */ | ||
| 134 | socklen_t ai_addrlen; /* length of socket-address */ | ||
| 135 | struct sockaddr *ai_addr; /* socket-address for socket */ | ||
| 136 | char *ai_canonname; /* canonical name for service location */ | ||
| 137 | struct addrinfo *ai_next; /* pointer to next in list */ | ||
| 138 | }; | ||
| 139 | .Ed | ||
| 140 | .Pp | ||
| 141 | The | ||
| 142 | .Fa nodename | ||
| 143 | and | ||
| 144 | .Fa servname | ||
| 145 | arguments are pointers to NUL-terminated strings or | ||
| 146 | .Dv NULL . | ||
| 147 | One or both of these two arguments must be a non-null pointer. | ||
| 148 | In the normal client scenario, both the | ||
| 149 | .Fa nodename | ||
| 150 | and | ||
| 151 | .Fa servname | ||
| 152 | are specified. | ||
| 153 | In the normal server scenario, only the | ||
| 154 | .Fa servname | ||
| 155 | is specified. | ||
| 156 | A non-null | ||
| 157 | .Fa nodename | ||
| 158 | string can be either a node name or a numeric host address string | ||
| 159 | (i.e., a dotted-decimal IPv4 address or an IPv6 hex address). | ||
| 160 | A non-null | ||
| 161 | .Fa servname | ||
| 162 | string can be either a service name or a decimal port number. | ||
| 163 | .Pp | ||
| 164 | The caller can optionally pass an | ||
| 165 | .Li addrinfo | ||
| 166 | structure, pointed to by the third argument, | ||
| 167 | to provide hints concerning the type of socket that the caller supports. | ||
| 168 | In this | ||
| 169 | .Fa hints | ||
| 170 | structure all members other than | ||
| 171 | .Fa ai_flags , | ||
| 172 | .Fa ai_family , | ||
| 173 | .Fa ai_socktype , | ||
| 174 | and | ||
| 175 | .Fa ai_protocol | ||
| 176 | must be zero or a null pointer. | ||
| 177 | A value of | ||
| 178 | .Dv PF_UNSPEC | ||
| 179 | for | ||
| 180 | .Fa ai_family | ||
| 181 | means the caller will accept any protocol family. | ||
| 182 | A value of 0 for | ||
| 183 | .Fa ai_socktype | ||
| 184 | means the caller will accept any socket type. | ||
| 185 | A value of 0 for | ||
| 186 | .Fa ai_protocol | ||
| 187 | means the caller will accept any protocol. | ||
| 188 | For example, if the caller handles only TCP and not UDP, then the | ||
| 189 | .Fa ai_socktype | ||
| 190 | member of the hints structure should be set to | ||
| 191 | .Dv SOCK_STREAM | ||
| 192 | when | ||
| 193 | .Fn getaddrinfo | ||
| 194 | is called. | ||
| 195 | If the caller handles only IPv4 and not IPv6, then the | ||
| 196 | .Fa ai_family | ||
| 197 | member of the | ||
| 198 | .Fa hints | ||
| 199 | structure should be set to | ||
| 200 | .Dv PF_INET | ||
| 201 | when | ||
| 202 | .Fn getaddrinfo | ||
| 203 | is called. | ||
| 204 | If the third argument to | ||
| 205 | .Fn getaddrinfo | ||
| 206 | is a null pointer, this is the same as if the caller had filled in an | ||
| 207 | .Li addrinfo | ||
| 208 | structure initialized to zero with | ||
| 209 | .Fa ai_family | ||
| 210 | set to | ||
| 211 | .Dv PF_UNSPEC . | ||
| 212 | .Pp | ||
| 213 | Upon successful return a pointer to a linked list of one or more | ||
| 214 | .Li addrinfo | ||
| 215 | structures is returned through the final argument. | ||
| 216 | The caller can process each | ||
| 217 | .Li addrinfo | ||
| 218 | structure in this list by following the | ||
| 219 | .Fa ai_next | ||
| 220 | pointer, until a null pointer is encountered. | ||
| 221 | In each returned | ||
| 222 | .Li addrinfo | ||
| 223 | structure the three members | ||
| 224 | .Fa ai_family , | ||
| 225 | .Fa ai_socktype , | ||
| 226 | and | ||
| 227 | .Fa ai_protocol | ||
| 228 | are the corresponding arguments for a call to the | ||
| 229 | .Xr socket 2 | ||
| 230 | function. | ||
| 231 | In each | ||
| 232 | .Li addrinfo | ||
| 233 | structure the | ||
| 234 | .Fa ai_addr | ||
| 235 | member points to a filled-in socket address structure whose length is | ||
| 236 | specified by the | ||
| 237 | .Fa ai_addrlen | ||
| 238 | member. | ||
| 239 | .Pp | ||
| 240 | The | ||
| 241 | .Fa ai_flags | ||
| 242 | argument can be set to any of the following values, OR'd together: | ||
| 243 | .Bl -tag -width "AI_NUMERICHOSTXX" | ||
| 244 | .It AI_PASSIVE | ||
| 245 | If the | ||
| 246 | .Dv AI_PASSIVE | ||
| 247 | bit is set, | ||
| 248 | the caller plans to use the returned socket address | ||
| 249 | structure in a call to | ||
| 250 | .Xr bind 2 . | ||
| 251 | In this case, if the | ||
| 252 | .Fa nodename | ||
| 253 | argument is a null pointer, then the IP address portion of the socket | ||
| 254 | address structure will be set to | ||
| 255 | .Dv INADDR_ANY | ||
| 256 | for an IPv4 address or | ||
| 257 | .Dv IN6ADDR_ANY_INIT | ||
| 258 | for an IPv6 address. | ||
| 259 | .Pp | ||
| 260 | If the | ||
| 261 | .Dv AI_PASSIVE | ||
| 262 | bit is not set, | ||
| 263 | the returned socket address structure will be ready for a | ||
| 264 | call to | ||
| 265 | .Xr connect 2 | ||
| 266 | .Pq for a connection-oriented protocol | ||
| 267 | or either | ||
| 268 | .Xr connect 2 , | ||
| 269 | .Xr sendto 2 , | ||
| 270 | or | ||
| 271 | .Xr sendmsg 2 | ||
| 272 | .Pq for a connectionless protocol . | ||
| 273 | In this case, if the | ||
| 274 | .Fa nodename | ||
| 275 | argument is a null pointer, then the IP address portion of the | ||
| 276 | socket address structure will be set to the loopback address. | ||
| 277 | .It AI_CANONNAME | ||
| 278 | If the | ||
| 279 | .Dv AI_CANONNAME | ||
| 280 | bit is set, | ||
| 281 | then upon successful return the | ||
| 282 | .Fa ai_canonname | ||
| 283 | member of the first | ||
| 284 | .Li addrinfo | ||
| 285 | structure in the linked list will point to a NUL-terminated string | ||
| 286 | containing the canonical name of the specified | ||
| 287 | .Fa nodename . | ||
| 288 | .It AI_NUMERICHOST | ||
| 289 | If the | ||
| 290 | .Dv AI_NUMERICHOST | ||
| 291 | bit is set, | ||
| 292 | then a non-null | ||
| 293 | .Fa nodename | ||
| 294 | string must be a numeric host address string. | ||
| 295 | Otherwise an error of | ||
| 296 | .Dv EAI_NONAME | ||
| 297 | is returned. | ||
| 298 | This flag prevents any type of name resolution service, | ||
| 299 | such as DNS, | ||
| 300 | from being called. | ||
| 301 | .It AI_NUMERICSERV | ||
| 302 | If the | ||
| 303 | .Dv AI_NUMERICSERV | ||
| 304 | bit is set, | ||
| 305 | then a non-null | ||
| 306 | .Fa servname | ||
| 307 | string must be a numeric port string. | ||
| 308 | Otherwise an error of | ||
| 309 | .Dv EAI_NONAME | ||
| 310 | is returned. | ||
| 311 | This flag prevents any type of name resolution service, | ||
| 312 | such as NIS, | ||
| 313 | from being called. | ||
| 314 | .El | ||
| 315 | .Pp | ||
| 316 | The arguments to | ||
| 317 | .Fn getaddrinfo | ||
| 318 | must be sufficiently consistent and unambiguous. | ||
| 319 | Issues to watch out for are: | ||
| 320 | .Bl -bullet | ||
| 321 | .It | ||
| 322 | .Fn getaddrinfo | ||
| 323 | will raise an error if members of the | ||
| 324 | .Fa hints | ||
| 325 | structure are not consistent. | ||
| 326 | For example, for internet address families, | ||
| 327 | .Fn getaddrinfo | ||
| 328 | will raise an error if you specify | ||
| 329 | .Dv SOCK_STREAM | ||
| 330 | to | ||
| 331 | .Fa ai_socktype | ||
| 332 | while you specify | ||
| 333 | .Dv IPPROTO_UDP | ||
| 334 | to | ||
| 335 | .Fa ai_protocol . | ||
| 336 | .It | ||
| 337 | If you specify a | ||
| 338 | .Fa servname | ||
| 339 | which is defined only for certain | ||
| 340 | .Fa ai_socktype , | ||
| 341 | .Fn getaddrinfo | ||
| 342 | will raise an error because the arguments are not consistent. | ||
| 343 | For example, | ||
| 344 | .Fn getaddrinfo | ||
| 345 | will raise an error if you ask for | ||
| 346 | .Dq Li tftp | ||
| 347 | service on | ||
| 348 | .Dv SOCK_STREAM . | ||
| 349 | .It | ||
| 350 | For internet address families, if you specify | ||
| 351 | .Fa servname | ||
| 352 | while you set | ||
| 353 | .Fa ai_socktype | ||
| 354 | to | ||
| 355 | .Dv SOCK_RAW , | ||
| 356 | .Fn getaddrinfo | ||
| 357 | will raise an error, because service names are not defined for the internet | ||
| 358 | .Dv SOCK_RAW | ||
| 359 | space. | ||
| 360 | .It | ||
| 361 | If you specify a numeric | ||
| 362 | .Fa servname , | ||
| 363 | while leaving | ||
| 364 | .Fa ai_socktype | ||
| 365 | and | ||
| 366 | .Fa ai_protocol | ||
| 367 | unspecified, | ||
| 368 | .Fn getaddrinfo | ||
| 369 | will raise an error. | ||
| 370 | This is because the numeric | ||
| 371 | .Fa servname | ||
| 372 | does not identify any socket type, and | ||
| 373 | .Fn getaddrinfo | ||
| 374 | is not allowed to glob the argument in such case. | ||
| 375 | .El | ||
| 376 | .\" | ||
| 377 | .Sh RETURN VALUES | ||
| 378 | .Fn getaddrinfo | ||
| 379 | returns zero on success, and non-zero on errors. | ||
| 380 | See | ||
| 381 | .Xr gai_strerror 3 | ||
| 382 | for a description of the non-zero error codes. | ||
| 383 | .\" | ||
| 384 | .Sh EXAMPLES | ||
| 385 | The following code tries to connect to | ||
| 386 | .Dq Li www.kame.net | ||
| 387 | service | ||
| 388 | .Dq Li http . | ||
| 389 | via stream socket. | ||
| 390 | It loops through all the addresses available, regardless of address family. | ||
| 391 | If the destination resolves to an IPv4 address, it will use | ||
| 392 | .Dv AF_INET | ||
| 393 | socket. | ||
| 394 | Similarly, if it resolves to IPv6, | ||
| 395 | .Dv AF_INET6 | ||
| 396 | socket is used. | ||
| 397 | Observe that there is no hardcoded reference to a particular address family. | ||
| 398 | The code works even if | ||
| 399 | .Nm getaddrinfo | ||
| 400 | returns addresses that are not IPv4/v6. | ||
| 401 | .Bd -literal -offset indent | ||
| 402 | struct addrinfo hints, *res, *res0; | ||
| 403 | int error; | ||
| 404 | int s; | ||
| 405 | const char *cause = NULL; | ||
| 406 | |||
| 407 | memset(&hints, 0, sizeof(hints)); | ||
| 408 | hints.ai_family = PF_UNSPEC; | ||
| 409 | hints.ai_socktype = SOCK_STREAM; | ||
| 410 | error = getaddrinfo("www.kame.net", "http", &hints, &res0); | ||
| 411 | if (error) { | ||
| 412 | errx(1, "%s", gai_strerror(error)); | ||
| 413 | /*NOTREACHED*/ | ||
| 414 | } | ||
| 415 | s = -1; | ||
| 416 | for (res = res0; res; res = res->ai_next) { | ||
| 417 | s = socket(res->ai_family, res->ai_socktype, | ||
| 418 | res->ai_protocol); | ||
| 419 | if (s < 0) { | ||
| 420 | cause = "socket"; | ||
| 421 | continue; | ||
| 422 | } | ||
| 423 | |||
| 424 | if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { | ||
| 425 | cause = "connect"; | ||
| 426 | close(s); | ||
| 427 | s = -1; | ||
| 428 | continue; | ||
| 429 | } | ||
| 430 | |||
| 431 | break; /* okay we got one */ | ||
| 432 | } | ||
| 433 | if (s < 0) { | ||
| 434 | err(1, "%s", cause); | ||
| 435 | /*NOTREACHED*/ | ||
| 436 | } | ||
| 437 | freeaddrinfo(res0); | ||
| 438 | .Ed | ||
| 439 | .Pp | ||
| 440 | The following example tries to open a wildcard listening socket onto service | ||
| 441 | .Dq Li http , | ||
| 442 | for all the address families available. | ||
| 443 | .Bd -literal -offset indent | ||
| 444 | struct addrinfo hints, *res, *res0; | ||
| 445 | int error; | ||
| 446 | int s[MAXSOCK]; | ||
| 447 | int nsock; | ||
| 448 | const char *cause = NULL; | ||
| 449 | |||
| 450 | memset(&hints, 0, sizeof(hints)); | ||
| 451 | hints.ai_family = PF_UNSPEC; | ||
| 452 | hints.ai_socktype = SOCK_STREAM; | ||
| 453 | hints.ai_flags = AI_PASSIVE; | ||
| 454 | error = getaddrinfo(NULL, "http", &hints, &res0); | ||
| 455 | if (error) { | ||
| 456 | errx(1, "%s", gai_strerror(error)); | ||
| 457 | /*NOTREACHED*/ | ||
| 458 | } | ||
| 459 | nsock = 0; | ||
| 460 | for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) { | ||
| 461 | s[nsock] = socket(res->ai_family, res->ai_socktype, | ||
| 462 | res->ai_protocol); | ||
| 463 | if (s[nsock] < 0) { | ||
| 464 | cause = "socket"; | ||
| 465 | continue; | ||
| 466 | } | ||
| 467 | |||
| 468 | if (bind(s[nsock], res->ai_addr, res->ai_addrlen) < 0) { | ||
| 469 | cause = "bind"; | ||
| 470 | close(s[nsock]); | ||
| 471 | continue; | ||
| 472 | } | ||
| 473 | (void) listen(s[nsock], 5); | ||
| 474 | |||
| 475 | nsock++; | ||
| 476 | } | ||
| 477 | if (nsock == 0) { | ||
| 478 | err(1, "%s", cause); | ||
| 479 | /*NOTREACHED*/ | ||
| 480 | } | ||
| 481 | freeaddrinfo(res0); | ||
| 482 | .Ed | ||
| 483 | .\" | ||
| 484 | .Sh SEE ALSO | ||
| 485 | .Xr gai_strerror 3 , | ||
| 486 | .Xr gethostbyname 3 , | ||
| 487 | .Xr getnameinfo 3 , | ||
| 488 | .Xr getservbyname 3 , | ||
| 489 | .Xr hosts 5 , | ||
| 490 | .Xr resolv.conf 5 , | ||
| 491 | .Xr services 5 , | ||
| 492 | .Xr hostname 7 , | ||
| 493 | .Xr named 8 | ||
| 494 | .Rs | ||
| 495 | .%A R. Gilligan | ||
| 496 | .%A S. Thomson | ||
| 497 | .%A J. Bound | ||
| 498 | .%A J. McCann | ||
| 499 | .%A W. Stevens | ||
| 500 | .%T Basic Socket Interface Extensions for IPv6 | ||
| 501 | .%R RFC 3493 | ||
| 502 | .%D February 2003 | ||
| 503 | .Re | ||
| 504 | .Rs | ||
| 505 | .%A Tatsuya Jinmei | ||
| 506 | .%A Atsushi Onoe | ||
| 507 | .%T "An Extension of Format for IPv6 Scoped Addresses" | ||
| 508 | .%R internet draft | ||
| 509 | .%N draft-ietf-ipngwg-scopedaddr-format-02.txt | ||
| 510 | .%O work in progress material | ||
| 511 | .Re | ||
| 512 | .Rs | ||
| 513 | .%A Craig Metz | ||
| 514 | .%T Protocol Independence Using the Sockets API | ||
| 515 | .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" | ||
| 516 | .%D June 2000 | ||
| 517 | .Re | ||
| 518 | .\" | ||
| 519 | .Sh STANDARDS | ||
| 520 | The | ||
| 521 | .Fn getaddrinfo | ||
| 522 | function is defined in IEEE POSIX 1003.1g draft specification, | ||
| 523 | and documented in | ||
| 524 | .Dq Basic Socket Interface Extensions for IPv6 | ||
| 525 | .Pq RFC 3493 . | ||
| 526 | .\" | ||
| 527 | .Sh HISTORY | ||
| 528 | The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit. | ||
| 529 | .\" | ||
| 530 | .Sh BUGS | ||
| 531 | The current implementation is not thread-safe. | ||
