lwres_getaddrinfo.html revision d4ef65050feac78554addf6e16a06c6e2e0bd331
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - Copyright (C) 2001 Internet Software Consortium.
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - Permission to use, copy, modify, and distribute this software for any
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - purpose with or without fee is hereby granted, provided that the above
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - copyright notice and this permission notice appear in all copies.
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp<!-- $Id: lwres_getaddrinfo.html,v 1.2 2001/04/10 21:51:38 bwelling Exp $ -->
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo</TITLE
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippNAME="GENERATOR"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCONTENT="Modular DocBook HTML Stylesheet Version 1.61
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippBGCOLOR="#FFFFFF"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippTEXT="#000000"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippLINK="#0000FF"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippVLINK="#840084"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippALINK="#0000FF"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo</A
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFNAMEDIV"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo, lwres_freeaddrinfo -- socket address structure to host and service name</DIV
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFSYNOPSISDIV"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippNAME="AEN12"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>Synopsis</H2
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCSYNOPSIS"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippNAME="AEN13"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCSYNOPSISINFO"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCDEF"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripplwres_getaddrinfo</CODE
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res);</CODE
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCDEF"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripplwres_freeaddrinfo</CODE
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>(struct addrinfo *ai);</CODE
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>If the operating system does not provide a
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>struct addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippthe following structure is used:
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PROGRAMLISTING"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>struct addrinfo {
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp int ai_family; /* PF_xxx */
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp int ai_socktype; /* SOCK_xxx */
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp size_t ai_addrlen; /* length of ai_addr */
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp char *ai_canonname; /* canonical name for hostname */
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp struct sockaddr *ai_addr; /* binary address */
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp struct addrinfo *ai_next; /* next structure in linked list */
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFSECT1"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippNAME="AEN29"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>DESCRIPTION</H2
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis used to get a list of IP addresses and port numbers for host
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>hostname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>servname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippThe function is the lightweight resolver's implementation of
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippas defined in RFC2133.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>hostname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>servname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippare pointers to null-terminated
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>hostname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis either a host name or a numeric host address string: a dotted decimal
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippIPv4 address or an IPv6 address.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>servname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis either a decimal port number or a service name as listed in
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FILENAME"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis an optional pointer to a
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>struct addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippThis structure can be used to provide hints concerning the type of socket
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippthat the caller supports or wishes to use.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippThe caller can supply the following structure elements in
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="VARIABLELIST"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_family</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>The protocol family that should be used.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_family</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>PF_UNSPEC</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippit means the caller will accept any protocol family supported by the
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippoperating system.</P
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_socktype</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>denotes the type of socket —
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>SOCK_STREAM</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>SOCK_DGRAM</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>SOCK_RAW</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp— that is wanted.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_socktype</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis zero the caller will accept any socket type.</P
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_protocol</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>indicates which transport protocol is wanted: IPPROTO_UDP or
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippIPPROTO_TCP.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_protocol</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis zero the caller will accept any protocol.</P
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_flags</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>AI_CANONNAME</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippbit is set, a successful call to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippwill return a a null-terminated string containing the canonical name
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippof the specified hostname in
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_canonname</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippof the first
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippstructure returned.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>AI_PASSIVE</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippbit indicates that the returned socket address structure is intended
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippfor used in a call to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippIn this case, if the hostname argument is a
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripppointer, then the IP address portion of the socket
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippaddress structure will be set to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>INADDR_ANY</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippfor an IPv4 address or
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>IN6ADDR_ANY_INIT</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippfor an IPv6 address.</P
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_flags</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippdoes not set the
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>AI_PASSIVE</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippbit, the returned socket address structure will be ready
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippfor use in a call to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>connect</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippfor a connection-oriented protocol or
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>connect</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>sendto</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>sendmsg</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippif a connectionless protocol was chosen.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippThe IP address portion of the socket address structure will be
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippset to the loopback address if
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>hostname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>AI_PASSIVE</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis not set in
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_flags</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_flags</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>AI_NUMERICHOST</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippit indicates that
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>hostname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippshould be treated as a numeric string defining an IPv4 or IPv6 address
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippand no name resolution should be attempted.</P
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>All other elements of the
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>struct addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippmust be zero.</P
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis treated as if the caller provided a
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>struct addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippinitialized to zero with
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_family</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>PF_UNSPEC</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>After a successful call to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis a pointer to a linked list of one or more
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>struct addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippin this list cn be processed by following
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_next</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripppointer, until a
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripppointer is encountered.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippThe three members
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_family</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_socktype</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_protocol</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippstructure contain the corresponding arguments for a call to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>socket</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippstructure in the list, the
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_addr</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippmember points to a filled-in socket address structure of length
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>ai_addrlen</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>All of the information returned by
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis dynamically allocated: the addrinfo structures, and the socket
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippaddress structures and canonical host name strings pointed to by the
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CONSTANT"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>addrinfo</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>structures.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippMemory allocated for the dynamically allocated structures created by
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippa successful call to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis released by
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_freeaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippis a pointer to a
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>struct addrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippcreated by a call to
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFSECT1"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippNAME="AEN142"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>RETURN VALUES</H2
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippreturns zero on success or one of the error codes listed in
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>gai_strerror</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70Trippif an error occurs.
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>hostname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="PARAMETER"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>servname</I
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="TYPE"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="FUNCTION"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo()</TT
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="ERRORCODE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>EAI_NONAME</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFSECT1"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippNAME="AEN154"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>SEE ALSO</H2
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_getaddrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_freeaddrinfo</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>lwres_gai_strerror</SPAN
e9a82959a2f34e4d3dccbbf0a3b4d01205017724TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
e9a82959a2f34e4d3dccbbf0a3b4d01205017724Tripp>RFC2133</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>getservbyname</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>connect</SPAN
e9a82959a2f34e4d3dccbbf0a3b4d01205017724TrippCLASS="CITEREFENTRY"
e9a82959a2f34e4d3dccbbf0a3b4d01205017724TrippCLASS="REFENTRYTITLE"
e9a82959a2f34e4d3dccbbf0a3b4d01205017724Tripp>sendto</SPAN
e9a82959a2f34e4d3dccbbf0a3b4d01205017724TrippCLASS="CITEREFENTRY"
e9a82959a2f34e4d3dccbbf0a3b4d01205017724TrippCLASS="REFENTRYTITLE"
e9a82959a2f34e4d3dccbbf0a3b4d01205017724Tripp>sendmsg</SPAN
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="CITEREFENTRY"
5f70c34f8d031331d8b7d31fe489615a94f6da70TrippCLASS="REFENTRYTITLE"
5f70c34f8d031331d8b7d31fe489615a94f6da70Tripp>socket</SPAN