ares_init - Initialize a resolver channel
#include <ares.h> int ares_init(ares_channel *channelptr)
ARES_INIT(3) Library Functions Manual ARES_INIT(3)
NAME
ares_init - Initialize a resolver channel
SYNOPSIS
#include <ares.h>
int ares_init(ares_channel *channelptr)
DESCRIPTION
The ares_init(3) function initializes a communications channel for name
service lookups. If it returns successfully, ares_init(3) will set the
variable pointed to by channelptr to a handle used to identify the name
service channel. The caller should invoke ares_destroy(3) on the han-
dle when the channel is no longer needed.
The ares_init_options(3) function is provide to offer more init alter-
natives.
RETURN VALUES
ares_init(3) can return any of the following values:
ARES_SUCCESS Initialization succeeded.
ARES_EFILE A configuration file could not be read.
ARES_ENOMEM The process's available memory was exhausted.
ARES_ENOTINITIALIZED
c-ares library initialization not yet performed.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
+---------------+------------------+
|ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+---------------+------------------+
|Availability | library/libcares |
+---------------+------------------+
|Stability | Volatile |
+---------------+------------------+
NOTES
When initializing from /etc/resolv.conf, ares_init(3) reads the domain
and search directives to allow lookups of short names relative to the
domains specified. The domain and search directives override one
another. If more that one instance of either domain or search direc-
tives is specified, the last occurrence wins. For more information,
please see the resolv.conf(5) manual page.
Source code for open source software components in Oracle Solaris can
be found at https://www.oracle.com/downloads/opensource/solaris-source-
code-downloads.html.
This software was built from source available at
https://github.com/oracle/solaris-userland. The original community
source was downloaded from https://c-ares.haxx.se/download/c-
ares-1.17.2.tar.gz.
Further information about this software can be found on the open source
community website at https://c-ares.haxx.se/.
SEE ALSO
ares_init_options(3), ares_destroy(3), ares_dup(3),
ares_library_init(3), ares_set_servers(3)
AUTHOR
Greg Hudson, MIT Information Systems
Copyright 1998 by the Massachusetts Institute of Technology.
Copyright (C) 2004-2010 by Daniel Stenberg.
5 March 2010 ARES_INIT(3)