lwres_getaddrinfo.html revision 8a66318e41ed14c5a88130e8c362610e8faa2121
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - Copyright (C) 2001, 2003 Internet Software Consortium.
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - Permission to use, copy, modify, and distribute this software for any
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - purpose with or without fee is hereby granted, provided that the above
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - copyright notice and this permission notice appear in all copies.
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen - PERFORMANCE OF THIS SOFTWARE.
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen<!-- $Id: lwres_getaddrinfo.html,v 1.10 2004/03/05 08:32:20 marka Exp $ -->
dfdebb1b925332352966804303b2516a6506a429Zbigniew Jędrzejewski-Szmek>lwres_getaddrinfo</TITLE
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenNAME="GENERATOR"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCONTENT="Modular DocBook HTML Stylesheet Version 1.73
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="REFENTRY"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenBGCOLOR="#FFFFFF"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenTEXT="#000000"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenLINK="#0000FF"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenVLINK="#840084"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenALINK="#0000FF"
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen>lwres_getaddrinfo</A
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="REFNAMEDIV"
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen>lwres_getaddrinfo, lwres_freeaddrinfo -- socket address structure to host and service name</DIV
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="REFSYNOPSISDIV"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="FUNCSYNOPSIS"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="FUNCSYNOPSISINFO"
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="FUNCDEF"
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynenlwres_getaddrinfo</CODE
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen>(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res);</CODE
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="FUNCDEF"
dfdebb1b925332352966804303b2516a6506a429Zbigniew Jędrzejewski-Szmeklwres_freeaddrinfo</CODE
dfdebb1b925332352966804303b2516a6506a429Zbigniew Jędrzejewski-Szmek>(struct addrinfo *ai);</CODE
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen>If the operating system does not provide a
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen>struct addrinfo</SPAN
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynenthe following structure is used:
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="PROGRAMLISTING"
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen>struct addrinfo {
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen int ai_family; /* PF_xxx */
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen int ai_socktype; /* SOCK_xxx */
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen size_t ai_addrlen; /* length of ai_addr */
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen char *ai_canonname; /* canonical name for hostname */
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen struct sockaddr *ai_addr; /* binary address */
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen struct addrinfo *ai_next; /* next structure in linked list */
1bc64d77352010f6951e7cccf77be99301e9664cMarko MyllynenCLASS="REFSECT1"
1bc64d77352010f6951e7cccf77be99301e9664cMarko Myllynen>DESCRIPTION</H2