lwres_gethostent.docbook revision 83a28ca274521e15086fc39febde507bcc4e145e
80833bb9a1bf25dcf19e814438a4b311d2e1f4cffuankg<!ENTITY mdash "—">]>
1dd5136d67e0164e4afd723a471b86a1b7eb1874sf - Copyright (C) 2001, 2004, 2005, 2007, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
1dd5136d67e0164e4afd723a471b86a1b7eb1874sf - This Source Code Form is subject to the terms of the Mozilla Public
1dd5136d67e0164e4afd723a471b86a1b7eb1874sf - License, v. 2.0. If a copy of the MPL was not distributed with this
e39eb98e3ad3fbf5c34b2fa1d16861f95143e22esf - file, You can obtain one at http://mozilla.org/MPL/2.0/.
d6fc66efa723db8b3ee5e9fd32579bed884e4e58sf<!-- Converted by db4-upgrade version 1.0 -->
d6fc66efa723db8b3ee5e9fd32579bed884e4e58sf<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0">
f00cb80197f824c3ff00dd4fdff3b2c267a519d1kbrand <refentryinfo>
f00cb80197f824c3ff00dd4fdff3b2c267a519d1kbrand <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
85eacfc96a04547ef25aabbc06440039715084c2jorton </refentryinfo>
8b645fd3c950da73513b546366c7cfa7476c5c06jim <copyright>
68ba377fc3b124baa759662077c48077ebadb186minfrin <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
68ba377fc3b124baa759662077c48077ebadb186minfrin </copyright>
00566fb187849626180724394a21ddcd28419fb2minfrin <refnamediv>
92b1631880b0bf43fe8b2663a03c8571eb04e433jim <refpurpose>lightweight resolver get network host entry</refpurpose>
89225e8e84d38b07a8335922497997e83d872e75jim </refnamediv>
89225e8e84d38b07a8335922497997e83d872e75jim <refsynopsisdiv>
89225e8e84d38b07a8335922497997e83d872e75jim <funcsynopsis>
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedooh<funcsynopsisinfo>#include <lwres/netdb.h></funcsynopsisinfo>
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedooh<funcprototype>
f5e28c78424d2f71c61ba457009f100bba38bc68chrisdstruct hostent *
f5e28c78424d2f71c61ba457009f100bba38bc68chrisd <paramdef>const char *<parameter>name</parameter></paramdef>
f4a715f904b014060ea6237fe29481ed21f5c7d0jorton </funcprototype>
f4a715f904b014060ea6237fe29481ed21f5c7d0jorton<funcprototype>
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawickstruct hostent *
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawick <paramdef>const char *<parameter>name</parameter></paramdef>
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jorton </funcprototype>
985a4368b93c3e9171a57897ad9454c8dbf4cdf6jorton<funcprototype>
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jortonstruct hostent *
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedooh <paramdef>const char *<parameter>addr</parameter></paramdef>
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedooh <paramdef>int <parameter>len</parameter></paramdef>
4be250c774bdac977eef29a02183ca78de29fb41rjung </funcprototype>
4be250c774bdac977eef29a02183ca78de29fb41rjung<funcprototype>
12b5dc9afa1844df5ac8acab98fb538432a2fa1crjungstruct hostent *
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedooh </funcprototype>
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedooh<funcprototype>
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh <paramdef>int <parameter>stayopen</parameter></paramdef>
0448378b899e8df0c060360f17c0af692adf17bchumbedooh </funcprototype>
0448378b899e8df0c060360f17c0af692adf17bchumbedooh<funcprototype>
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedooh </funcprototype>
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedooh<funcprototype>
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedoohstruct hostent *
91654e263480f0fdc2a03d782ff23f8dad07cf79humbedooh<function>lwres_gethostbyname_r</function></funcdef>
91814c869ca39ce45dfe147307d2a831cac6ecbehumbedooh <paramdef>const char *<parameter>name</parameter></paramdef>
91654e263480f0fdc2a03d782ff23f8dad07cf79humbedooh <paramdef>struct hostent *<parameter>resbuf</parameter></paramdef>
79c5787b92ac5f0e1cc82393816c77a006399316trawick <paramdef>char *<parameter>buf</parameter></paramdef>
79c5787b92ac5f0e1cc82393816c77a006399316trawick <paramdef>int <parameter>buflen</parameter></paramdef>
79c5787b92ac5f0e1cc82393816c77a006399316trawick <paramdef>int *<parameter>error</parameter></paramdef>
79c5787b92ac5f0e1cc82393816c77a006399316trawick </funcprototype>
79c5787b92ac5f0e1cc82393816c77a006399316trawick<funcprototype>
79c5787b92ac5f0e1cc82393816c77a006399316trawickstruct hostent *
79c5787b92ac5f0e1cc82393816c77a006399316trawick <paramdef>const char *<parameter>addr</parameter></paramdef>
12b987b969f03ef98d9175a53d849ab62f5684fecovener <paramdef>int <parameter>type</parameter></paramdef>
099c357f282d4aebf2b32264f7dce6ffc0497c37sf <paramdef>struct hostent *<parameter>resbuf</parameter></paramdef>
50f8c80eb4d3989ebf3f1341aeef4d2d302af162sf </funcprototype>
50f8c80eb4d3989ebf3f1341aeef4d2d302af162sf<funcprototype>
50f8c80eb4d3989ebf3f1341aeef4d2d302af162sfstruct hostent *
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton <paramdef>struct hostent *<parameter>resbuf</parameter></paramdef>
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton <paramdef>char *<parameter>buf</parameter></paramdef>
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton <paramdef>int <parameter>buflen</parameter></paramdef>
536e48c08d674acac5d44929318f2ad928edc361jorton <paramdef>int *<parameter>error</parameter></paramdef>
536e48c08d674acac5d44929318f2ad928edc361jorton </funcprototype>
e81785da447b469da66f218b3f0244aab507958djorton<funcprototype>
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton <paramdef>int <parameter>stayopen</parameter></paramdef>
459eaf0826f995b73a0dc066f59ea10d2824e72dsf </funcprototype>
459eaf0826f995b73a0dc066f59ea10d2824e72dsf<funcprototype>
53e9b27aba029b18be814df40bcf6f0428771d1efuankg </funcprototype>
53e9b27aba029b18be814df40bcf6f0428771d1efuankg</funcsynopsis>
53e9b27aba029b18be814df40bcf6f0428771d1efuankg </refsynopsisdiv>
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin These functions provide hostname-to-address and
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin address-to-hostname lookups by means of the lightweight resolver.
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin They are similar to the standard
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin <citerefentry>
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin <refentrytitle>gethostent</refentrytitle><manvolnum>3</manvolnum>
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin </citerefentry>
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin functions provided by most operating systems.
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung which is usually defined in
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjungstruct hostent {
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung char *h_name; /* official name of host */
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung char **h_aliases; /* alias list */
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick int h_addrtype; /* host address type */
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick int h_length; /* length of address */
0827cb14e550f6f65018431c22c2c913631c8f25kbrand char **h_addr_list; /* list of addresses from name server */
ae600ca541efc686b34f8b1f21bd3d0741d37674covener#define h_addr h_addr_list[0] /* address, for backward compatibility */
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick</programlisting>
cfa64348224b66dd1c9979b809406c4d15b1c137fielding The members of this structure are:
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim <variablelist>
cfa64348224b66dd1c9979b809406c4d15b1c137fielding <varlistentry>
cfa64348224b66dd1c9979b809406c4d15b1c137fielding The official (canonical) name of the host.
A recoverable error occurred, e.g., a timeout.