"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/bind9/include/bind9/getaddresses.h" (4 Sep 2020, 1564 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "getaddresses.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef BIND9_GETADDRESSES_H
   13 #define BIND9_GETADDRESSES_H 1
   14 
   15 /*! \file bind9/getaddresses.h */
   16 
   17 #include <isc/lang.h>
   18 #include <isc/net.h>
   19 #include <isc/types.h>
   20 
   21 ISC_LANG_BEGINDECLS
   22 
   23 isc_result_t
   24 bind9_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
   25            int addrsize, int *addrcount);
   26 /*%<
   27  * Use the system resolver to get the addresses associated with a hostname.
   28  * If successful, the number of addresses found is returned in 'addrcount'.
   29  * If a hostname lookup is performed and addresses of an unknown family is
   30  * seen, it is ignored.  If more than 'addrsize' addresses are seen, the
   31  * first 'addrsize' are returned and the remainder silently truncated.
   32  *
   33  * This routine may block.  If called by a program using the isc_app
   34  * framework, it should be surrounded by isc_app_block()/isc_app_unblock().
   35  *
   36  *  Requires:
   37  *\li   'hostname' is not NULL.
   38  *\li   'addrs' is not NULL.
   39  *\li   'addrsize' > 0
   40  *\li   'addrcount' is not NULL.
   41  *
   42  *
   43  * Returns:
   44  *\li   #ISC_R_SUCCESS
   45  *\li   #ISC_R_NOTFOUND
   46  *\li   #ISC_R_FAMILYNOSUPPORT - 'hostname' is an IPv6 address, and IPv6 is
   47  *      not supported.
   48  */
   49 
   50 ISC_LANG_ENDDECLS
   51 
   52 #endif /* BIND9_GETADDRESSES_H */