getaddresses.h File Reference

#include <isc/lang.h>
#include <isc/types.h>
#include <isc/net.h>

Go to the source code of this file.

Defines

#define BIND9_GETADDRESSES_H   1

Functions

ISC_LANG_BEGINDECLS isc_result_t bind9_getaddresses (const char *hostname, in_port_t port, isc_sockaddr_t *addrs, int addrsize, int *addrcount)
 Use the system resolver to get the addresses associated with a hostname. If successful, the number of addresses found is returned in 'addrcount'. If a hostname lookup is performed and addresses of an unknown family is seen, it is ignored. If more than 'addrsize' addresses are seen, the first 'addrsize' are returned and the remainder silently truncated.


Detailed Description

Definition in file getaddresses.h.


Define Documentation

#define BIND9_GETADDRESSES_H   1

Definition at line 21 of file getaddresses.h.


Function Documentation

ISC_LANG_BEGINDECLS isc_result_t bind9_getaddresses ( const char *  hostname,
in_port_t  port,
isc_sockaddr_t addrs,
int  addrsize,
int *  addrcount 
)

Use the system resolver to get the addresses associated with a hostname. If successful, the number of addresses found is returned in 'addrcount'. If a hostname lookup is performed and addresses of an unknown family is seen, it is ignored. If more than 'addrsize' addresses are seen, the first 'addrsize' are returned and the remainder silently truncated.

This routine may block. If called by a program using the isc_app framework, it should be surrounded by isc_app_block()/isc_app_unblock().

Requires:

Returns:

Definition at line 50 of file getaddresses.c.

References AF_INET6, h_errno, have_ipv4, have_ipv6, isc_net_probeipv4(), isc_net_probeipv6(), isc_netaddr_fromin6(), isc_netaddr_setzone(), isc_netscope_pton(), ISC_R_BADADDRESSFORM, ISC_R_FAILURE, ISC_R_FAMILYNOSUPPORT, ISC_R_NOTFOUND, ISC_R_SUCCESS, isc_sockaddr_fromin(), isc_sockaddr_fromin6(), isc_sockaddr_fromnetaddr(), isc_sockaddr_v6fromin(), ISC_TF, PF_INET6, REQUIRE, sockaddr_in6::sin6_addr, and zone.

Referenced by get_address(), get_addresses(), getaddresses(), and set_nameserver().


Generated on Tue Apr 28 17:41:07 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha