|
Packit |
514978 |
.\"
|
|
Packit |
514978 |
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
|
Packit |
514978 |
.\" Copyright (C) 2004-2010 by Daniel Stenberg
|
|
Packit |
514978 |
.\"
|
|
Packit |
514978 |
.\" Permission to use, copy, modify, and distribute this
|
|
Packit |
514978 |
.\" software and its documentation for any purpose and without
|
|
Packit |
514978 |
.\" fee is hereby granted, provided that the above copyright
|
|
Packit |
514978 |
.\" notice appear in all copies and that both that copyright
|
|
Packit |
514978 |
.\" notice and this permission notice appear in supporting
|
|
Packit |
514978 |
.\" documentation, and that the name of M.I.T. not be used in
|
|
Packit |
514978 |
.\" advertising or publicity pertaining to distribution of the
|
|
Packit |
514978 |
.\" software without specific, written prior permission.
|
|
Packit |
514978 |
.\" M.I.T. makes no representations about the suitability of
|
|
Packit |
514978 |
.\" this software for any purpose. It is provided "as is"
|
|
Packit |
514978 |
.\" without express or implied warranty.
|
|
Packit |
514978 |
.\"
|
|
Packit |
514978 |
.TH ARES_INIT 3 "5 March 2010"
|
|
Packit |
514978 |
.SH NAME
|
|
Packit |
514978 |
ares_init \- Initialize a resolver channel
|
|
Packit |
514978 |
.SH SYNOPSIS
|
|
Packit |
514978 |
.nf
|
|
Packit |
514978 |
#include <ares.h>
|
|
Packit |
514978 |
|
|
Packit |
514978 |
int ares_init(ares_channel *\fIchannelptr\fP)
|
|
Packit |
514978 |
.fi
|
|
Packit |
514978 |
.SH DESCRIPTION
|
|
Packit |
514978 |
The \fBares_init(3)\fP function initializes a communications channel for name
|
|
Packit |
514978 |
service lookups. If it returns successfully, \fBares_init(3)\fP will set the
|
|
Packit |
514978 |
variable pointed to by \fIchannelptr\fP to a handle used to identify the name
|
|
Packit |
514978 |
service channel. The caller should invoke \fIares_destroy(3)\fP on the handle
|
|
Packit |
514978 |
when the channel is no longer needed.
|
|
Packit |
514978 |
|
|
Packit |
514978 |
The \fIares_init_options(3)\fP function is provide to offer more init
|
|
Packit |
514978 |
alternatives.
|
|
Packit |
514978 |
.SH RETURN VALUES
|
|
Packit |
514978 |
\fIares_init(3)\fP can return any of the following values:
|
|
Packit |
514978 |
.TP 14
|
|
Packit |
514978 |
.B ARES_SUCCESS
|
|
Packit |
514978 |
Initialization succeeded.
|
|
Packit |
514978 |
.TP 14
|
|
Packit |
514978 |
.B ARES_EFILE
|
|
Packit |
514978 |
A configuration file could not be read.
|
|
Packit |
514978 |
.TP 14
|
|
Packit |
514978 |
.B ARES_ENOMEM
|
|
Packit |
514978 |
The process's available memory was exhausted.
|
|
Packit |
514978 |
.TP 14
|
|
Packit |
514978 |
.B ARES_ENOTINITIALIZED
|
|
Packit |
514978 |
c-ares library initialization not yet performed.
|
|
Packit |
514978 |
.SH NOTES
|
|
Packit |
514978 |
When initializing from
|
|
Packit |
514978 |
.B /etc/resolv.conf,
|
|
Packit |
514978 |
.BR ares_init (3)
|
|
Packit |
514978 |
reads the
|
|
Packit |
514978 |
.I domain
|
|
Packit |
514978 |
and
|
|
Packit |
514978 |
.I search
|
|
Packit |
514978 |
directives to allow lookups of short names relative to the domains
|
|
Packit |
514978 |
specified. The
|
|
Packit |
514978 |
.I domain
|
|
Packit |
514978 |
and
|
|
Packit |
514978 |
.I search
|
|
Packit |
514978 |
directives override one another. If more that one instance of either
|
|
Packit |
514978 |
.I domain
|
|
Packit |
514978 |
or
|
|
Packit |
514978 |
.I search
|
|
Packit |
514978 |
directives is specified, the last occurrence wins. For more information,
|
|
Packit |
514978 |
please see the
|
|
Packit |
514978 |
.BR resolv.conf (5)
|
|
Packit |
514978 |
manual page.
|
|
Packit |
514978 |
.SH SEE ALSO
|
|
Packit |
514978 |
.BR ares_init_options(3),
|
|
Packit |
514978 |
.BR ares_destroy(3),
|
|
Packit |
514978 |
.BR ares_dup(3),
|
|
Packit |
514978 |
.BR ares_library_init(3),
|
|
Packit |
514978 |
.BR ares_set_servers(3)
|
|
Packit |
514978 |
.SH AUTHOR
|
|
Packit |
514978 |
Greg Hudson, MIT Information Systems
|
|
Packit |
514978 |
.br
|
|
Packit |
514978 |
Copyright 1998 by the Massachusetts Institute of Technology.
|
|
Packit |
514978 |
.br
|
|
Packit |
514978 |
Copyright (C) 2004-2010 by Daniel Stenberg.
|