libevent
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
event2
dns_compat.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
3
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* 3. The name of the author may not be used to endorse or promote products
14
* derived from this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
#ifndef _EVENT2_DNS_COMPAT_H_
28
#define _EVENT2_DNS_COMPAT_H_
29
38
#ifdef __cplusplus
39
extern
"C"
{
40
#endif
41
42
#include <event2/event-config.h>
43
#ifdef _EVENT_HAVE_SYS_TYPES_H
44
#include <sys/types.h>
45
#endif
46
#ifdef _EVENT_HAVE_SYS_TIME_H
47
#include <sys/time.h>
48
#endif
49
50
/* For int types. */
51
#include <
event2/util.h
>
52
69
int
evdns_init
(
void
);
70
71
struct
evdns_base;
79
struct
evdns_base *
evdns_get_global_base
(
void
);
80
96
void
evdns_shutdown
(
int
fail_requests);
97
112
int
evdns_nameserver_add
(
unsigned
long
int
address);
113
129
int
evdns_count_nameservers
(
void
);
130
143
int
evdns_clear_nameservers_and_suspend
(
void
);
144
158
int
evdns_resume
(
void
);
159
173
int
evdns_nameserver_ip_add
(
const
char
*ip_as_string);
174
189
int
evdns_resolve_ipv4
(
const
char
*name,
int
flags,
evdns_callback_type
callback,
void
*ptr);
190
201
int
evdns_resolve_ipv6
(
const
char
*name,
int
flags,
evdns_callback_type
callback,
void
*ptr);
202
203
struct
in_addr;
204
struct
in6_addr;
205
220
int
evdns_resolve_reverse
(
const
struct
in_addr *in,
int
flags,
evdns_callback_type
callback,
void
*ptr);
221
236
int
evdns_resolve_reverse_ipv6
(
const
struct
in6_addr *in,
int
flags,
evdns_callback_type
callback,
void
*ptr);
237
254
int
evdns_set_option
(
const
char
*option,
const
char
*val,
int
flags);
255
281
int
evdns_resolv_conf_parse
(
int
flags,
const
char
*
const
filename);
282
290
void
evdns_search_clear
(
void
);
291
301
void
evdns_search_add
(
const
char
*domain);
302
315
void
evdns_search_ndots_set
(
const
int
ndots);
316
325
struct
evdns_server_port *
evdns_add_server_port
(
evutil_socket_t
socket,
int
flags,
evdns_request_callback_fn_type
callback,
void
*user_data);
326
327
#ifdef WIN32
328
int
evdns_config_windows_nameservers(
void
);
329
#define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
330
#endif
331
332
#ifdef __cplusplus
333
}
334
#endif
335
336
#endif
/* _EVENT2_EVENT_COMPAT_H_ */
Generated by
1.8.4