1ARES_INIT(3)               Library Functions Manual               ARES_INIT(3)
2
3
4

NAME

6       ares_init - Initialize a resolver channel
7

SYNOPSIS

9       #include <ares.h>
10
11       int ares_init(ares_channel *channelptr)
12

DESCRIPTION

14       The ares_init(3) function initializes a communications channel for name
15       service lookups.  If it returns successfully, ares_init(3) will set the
16       variable pointed to by channelptr to a handle used to identify the name
17       service channel.  The caller should invoke ares_destroy(3) on the  han‐
18       dle when the channel is no longer needed.
19
20       The  ares_init_options(3) function is provide to offer more init alter‐
21       natives.
22

RETURN VALUES

24       ares_init(3) can return any of the following values:
25
26       ARES_SUCCESS  Initialization succeeded.
27
28       ARES_EFILE    A configuration file could not be read.
29
30       ARES_ENOMEM   The process's available memory was exhausted.
31
32       ARES_ENOTINITIALIZED
33                     c-ares library initialization not yet performed.
34

NOTES

36       When initializing from /etc/resolv.conf, ares_init(3) reads the  domain
37       and  search  directives to allow lookups of short names relative to the
38       domains specified.  The  domain  and  search  directives  override  one
39       another.  If  more  that one instance of either domain or search direc‐
40       tives is specified, the last occurrence  wins.  For  more  information,
41       please see the resolv.conf(5) manual page.
42

SEE ALSO

44       ares_init_options(3),           ares_destroy(3),           ares_dup(3),
45       ares_library_init(3), ares_set_servers(3)
46

AUTHOR

48       Greg Hudson, MIT Information Systems
49       Copyright 1998 by the Massachusetts Institute of Technology.
50       Copyright (C) 2004-2010 by Daniel Stenberg.
51
52
53
54                                 5 March 2010                     ARES_INIT(3)
Impressum