12b15cb3dSCy Schubert /* 22b15cb3dSCy Schubert * Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu> 32b15cb3dSCy Schubert * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 42b15cb3dSCy Schubert * 52b15cb3dSCy Schubert * Redistribution and use in source and binary forms, with or without 62b15cb3dSCy Schubert * modification, are permitted provided that the following conditions 72b15cb3dSCy Schubert * are met: 82b15cb3dSCy Schubert * 1. Redistributions of source code must retain the above copyright 92b15cb3dSCy Schubert * notice, this list of conditions and the following disclaimer. 102b15cb3dSCy Schubert * 2. Redistributions in binary form must reproduce the above copyright 112b15cb3dSCy Schubert * notice, this list of conditions and the following disclaimer in the 122b15cb3dSCy Schubert * documentation and/or other materials provided with the distribution. 132b15cb3dSCy Schubert * 3. The name of the author may not be used to endorse or promote products 142b15cb3dSCy Schubert * derived from this software without specific prior written permission. 152b15cb3dSCy Schubert * 162b15cb3dSCy Schubert * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 172b15cb3dSCy Schubert * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 182b15cb3dSCy Schubert * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 192b15cb3dSCy Schubert * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 202b15cb3dSCy Schubert * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 212b15cb3dSCy Schubert * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222b15cb3dSCy Schubert * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232b15cb3dSCy Schubert * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242b15cb3dSCy Schubert * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 252b15cb3dSCy Schubert * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262b15cb3dSCy Schubert */ 272b15cb3dSCy Schubert #ifndef EVENT2_DNS_COMPAT_H_INCLUDED_ 282b15cb3dSCy Schubert #define EVENT2_DNS_COMPAT_H_INCLUDED_ 292b15cb3dSCy Schubert 302b15cb3dSCy Schubert /** @file event2/dns_compat.h 312b15cb3dSCy Schubert 322b15cb3dSCy Schubert Potentially non-threadsafe versions of the functions in dns.h: provided 332b15cb3dSCy Schubert only for backwards compatibility. 342b15cb3dSCy Schubert 352b15cb3dSCy Schubert 362b15cb3dSCy Schubert */ 372b15cb3dSCy Schubert 382b15cb3dSCy Schubert #ifdef __cplusplus 392b15cb3dSCy Schubert extern "C" { 402b15cb3dSCy Schubert #endif 412b15cb3dSCy Schubert 422b15cb3dSCy Schubert #include <event2/event-config.h> 432b15cb3dSCy Schubert #ifdef EVENT__HAVE_SYS_TYPES_H 442b15cb3dSCy Schubert #include <sys/types.h> 452b15cb3dSCy Schubert #endif 462b15cb3dSCy Schubert #ifdef EVENT__HAVE_SYS_TIME_H 472b15cb3dSCy Schubert #include <sys/time.h> 482b15cb3dSCy Schubert #endif 492b15cb3dSCy Schubert 502b15cb3dSCy Schubert /* For int types. */ 512b15cb3dSCy Schubert #include <event2/util.h> 52*a466cc55SCy Schubert #include <event2/visibility.h> 532b15cb3dSCy Schubert 542b15cb3dSCy Schubert /** 552b15cb3dSCy Schubert Initialize the asynchronous DNS library. 562b15cb3dSCy Schubert 572b15cb3dSCy Schubert This function initializes support for non-blocking name resolution by 582b15cb3dSCy Schubert calling evdns_resolv_conf_parse() on UNIX and 592b15cb3dSCy Schubert evdns_config_windows_nameservers() on Windows. 602b15cb3dSCy Schubert 612b15cb3dSCy Schubert @deprecated This function is deprecated because it always uses the current 622b15cb3dSCy Schubert event base, and is easily confused by multiple calls to event_init(), and 632b15cb3dSCy Schubert so is not safe for multithreaded use. Additionally, it allocates a global 642b15cb3dSCy Schubert structure that only one thread can use. The replacement is 652b15cb3dSCy Schubert evdns_base_new(). 662b15cb3dSCy Schubert 672b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 682b15cb3dSCy Schubert @see evdns_shutdown() 692b15cb3dSCy Schubert */ 70*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 712b15cb3dSCy Schubert int evdns_init(void); 722b15cb3dSCy Schubert 732b15cb3dSCy Schubert struct evdns_base; 742b15cb3dSCy Schubert /** 752b15cb3dSCy Schubert Return the global evdns_base created by event_init() and used by the other 762b15cb3dSCy Schubert deprecated functions. 772b15cb3dSCy Schubert 782b15cb3dSCy Schubert @deprecated This function is deprecated because use of the global 792b15cb3dSCy Schubert evdns_base is error-prone. 802b15cb3dSCy Schubert */ 81*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 822b15cb3dSCy Schubert struct evdns_base *evdns_get_global_base(void); 832b15cb3dSCy Schubert 842b15cb3dSCy Schubert /** 852b15cb3dSCy Schubert Shut down the asynchronous DNS resolver and terminate all active requests. 862b15cb3dSCy Schubert 872b15cb3dSCy Schubert If the 'fail_requests' option is enabled, all active requests will return 882b15cb3dSCy Schubert an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise, 892b15cb3dSCy Schubert the requests will be silently discarded. 902b15cb3dSCy Schubert 912b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 922b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 932b15cb3dSCy Schubert function is evdns_base_shutdown(). 942b15cb3dSCy Schubert 952b15cb3dSCy Schubert @param fail_requests if zero, active requests will be aborted; if non-zero, 962b15cb3dSCy Schubert active requests will return DNS_ERR_SHUTDOWN. 972b15cb3dSCy Schubert @see evdns_init() 982b15cb3dSCy Schubert */ 99*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 1002b15cb3dSCy Schubert void evdns_shutdown(int fail_requests); 1012b15cb3dSCy Schubert 1022b15cb3dSCy Schubert /** 1032b15cb3dSCy Schubert Add a nameserver. 1042b15cb3dSCy Schubert 1052b15cb3dSCy Schubert The address should be an IPv4 address in network byte order. 1062b15cb3dSCy Schubert The type of address is chosen so that it matches in_addr.s_addr. 1072b15cb3dSCy Schubert 1082b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 1092b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 1102b15cb3dSCy Schubert function is evdns_base_nameserver_add(). 1112b15cb3dSCy Schubert 1122b15cb3dSCy Schubert @param address an IP address in network byte order 1132b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 1142b15cb3dSCy Schubert @see evdns_nameserver_ip_add() 1152b15cb3dSCy Schubert */ 116*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 1172b15cb3dSCy Schubert int evdns_nameserver_add(unsigned long int address); 1182b15cb3dSCy Schubert 1192b15cb3dSCy Schubert /** 1202b15cb3dSCy Schubert Get the number of configured nameservers. 1212b15cb3dSCy Schubert 1222b15cb3dSCy Schubert This returns the number of configured nameservers (not necessarily the 1232b15cb3dSCy Schubert number of running nameservers). This is useful for double-checking 1242b15cb3dSCy Schubert whether our calls to the various nameserver configuration functions 1252b15cb3dSCy Schubert have been successful. 1262b15cb3dSCy Schubert 1272b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 1282b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 1292b15cb3dSCy Schubert function is evdns_base_count_nameservers(). 1302b15cb3dSCy Schubert 1312b15cb3dSCy Schubert @return the number of configured nameservers 1322b15cb3dSCy Schubert @see evdns_nameserver_add() 1332b15cb3dSCy Schubert */ 134*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 1352b15cb3dSCy Schubert int evdns_count_nameservers(void); 1362b15cb3dSCy Schubert 1372b15cb3dSCy Schubert /** 1382b15cb3dSCy Schubert Remove all configured nameservers, and suspend all pending resolves. 1392b15cb3dSCy Schubert 1402b15cb3dSCy Schubert Resolves will not necessarily be re-attempted until evdns_resume() is called. 1412b15cb3dSCy Schubert 1422b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 1432b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 1442b15cb3dSCy Schubert function is evdns_base_clear_nameservers_and_suspend(). 1452b15cb3dSCy Schubert 1462b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 1472b15cb3dSCy Schubert @see evdns_resume() 1482b15cb3dSCy Schubert */ 149*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 1502b15cb3dSCy Schubert int evdns_clear_nameservers_and_suspend(void); 1512b15cb3dSCy Schubert 1522b15cb3dSCy Schubert /** 1532b15cb3dSCy Schubert Resume normal operation and continue any suspended resolve requests. 1542b15cb3dSCy Schubert 1552b15cb3dSCy Schubert Re-attempt resolves left in limbo after an earlier call to 1562b15cb3dSCy Schubert evdns_clear_nameservers_and_suspend(). 1572b15cb3dSCy Schubert 1582b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 1592b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 1602b15cb3dSCy Schubert function is evdns_base_resume(). 1612b15cb3dSCy Schubert 1622b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 1632b15cb3dSCy Schubert @see evdns_clear_nameservers_and_suspend() 1642b15cb3dSCy Schubert */ 165*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 1662b15cb3dSCy Schubert int evdns_resume(void); 1672b15cb3dSCy Schubert 1682b15cb3dSCy Schubert /** 1692b15cb3dSCy Schubert Add a nameserver. 1702b15cb3dSCy Schubert 1712b15cb3dSCy Schubert This wraps the evdns_nameserver_add() function by parsing a string as an IP 1722b15cb3dSCy Schubert address and adds it as a nameserver. 1732b15cb3dSCy Schubert 1742b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 1752b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 1762b15cb3dSCy Schubert function is evdns_base_nameserver_ip_add(). 1772b15cb3dSCy Schubert 1782b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 1792b15cb3dSCy Schubert @see evdns_nameserver_add() 1802b15cb3dSCy Schubert */ 181*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 1822b15cb3dSCy Schubert int evdns_nameserver_ip_add(const char *ip_as_string); 1832b15cb3dSCy Schubert 1842b15cb3dSCy Schubert /** 1852b15cb3dSCy Schubert Lookup an A record for a given name. 1862b15cb3dSCy Schubert 1872b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 1882b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 1892b15cb3dSCy Schubert function is evdns_base_resolve_ipv4(). 1902b15cb3dSCy Schubert 1912b15cb3dSCy Schubert @param name a DNS hostname 1922b15cb3dSCy Schubert @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. 1932b15cb3dSCy Schubert @param callback a callback function to invoke when the request is completed 1942b15cb3dSCy Schubert @param ptr an argument to pass to the callback function 1952b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 1962b15cb3dSCy Schubert @see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() 1972b15cb3dSCy Schubert */ 198*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 1992b15cb3dSCy Schubert int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr); 2002b15cb3dSCy Schubert 2012b15cb3dSCy Schubert /** 2022b15cb3dSCy Schubert Lookup an AAAA record for a given name. 2032b15cb3dSCy Schubert 2042b15cb3dSCy Schubert @param name a DNS hostname 2052b15cb3dSCy Schubert @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. 2062b15cb3dSCy Schubert @param callback a callback function to invoke when the request is completed 2072b15cb3dSCy Schubert @param ptr an argument to pass to the callback function 2082b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 2092b15cb3dSCy Schubert @see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() 2102b15cb3dSCy Schubert */ 211*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 2122b15cb3dSCy Schubert int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr); 2132b15cb3dSCy Schubert 2142b15cb3dSCy Schubert struct in_addr; 2152b15cb3dSCy Schubert struct in6_addr; 2162b15cb3dSCy Schubert 2172b15cb3dSCy Schubert /** 2182b15cb3dSCy Schubert Lookup a PTR record for a given IP address. 2192b15cb3dSCy Schubert 2202b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 2212b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 2222b15cb3dSCy Schubert function is evdns_base_resolve_reverse(). 2232b15cb3dSCy Schubert 2242b15cb3dSCy Schubert @param in an IPv4 address 2252b15cb3dSCy Schubert @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. 2262b15cb3dSCy Schubert @param callback a callback function to invoke when the request is completed 2272b15cb3dSCy Schubert @param ptr an argument to pass to the callback function 2282b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 2292b15cb3dSCy Schubert @see evdns_resolve_reverse_ipv6() 2302b15cb3dSCy Schubert */ 231*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 2322b15cb3dSCy Schubert int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr); 2332b15cb3dSCy Schubert 2342b15cb3dSCy Schubert /** 2352b15cb3dSCy Schubert Lookup a PTR record for a given IPv6 address. 2362b15cb3dSCy Schubert 2372b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 2382b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 2392b15cb3dSCy Schubert function is evdns_base_resolve_reverse_ipv6(). 2402b15cb3dSCy Schubert 2412b15cb3dSCy Schubert @param in an IPv6 address 2422b15cb3dSCy Schubert @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. 2432b15cb3dSCy Schubert @param callback a callback function to invoke when the request is completed 2442b15cb3dSCy Schubert @param ptr an argument to pass to the callback function 2452b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 2462b15cb3dSCy Schubert @see evdns_resolve_reverse_ipv6() 2472b15cb3dSCy Schubert */ 248*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 2492b15cb3dSCy Schubert int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr); 2502b15cb3dSCy Schubert 2512b15cb3dSCy Schubert /** 2522b15cb3dSCy Schubert Set the value of a configuration option. 2532b15cb3dSCy Schubert 2542b15cb3dSCy Schubert The currently available configuration options are: 2552b15cb3dSCy Schubert 2562b15cb3dSCy Schubert ndots, timeout, max-timeouts, max-inflight, and attempts 2572b15cb3dSCy Schubert 2582b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 2592b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 2602b15cb3dSCy Schubert function is evdns_base_set_option(). 2612b15cb3dSCy Schubert 2622b15cb3dSCy Schubert @param option the name of the configuration option to be modified 2632b15cb3dSCy Schubert @param val the value to be set 2642b15cb3dSCy Schubert @param flags Ignored. 2652b15cb3dSCy Schubert @return 0 if successful, or -1 if an error occurred 2662b15cb3dSCy Schubert */ 267*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 2682b15cb3dSCy Schubert int evdns_set_option(const char *option, const char *val, int flags); 2692b15cb3dSCy Schubert 2702b15cb3dSCy Schubert /** 2712b15cb3dSCy Schubert Parse a resolv.conf file. 2722b15cb3dSCy Schubert 2732b15cb3dSCy Schubert The 'flags' parameter determines what information is parsed from the 2742b15cb3dSCy Schubert resolv.conf file. See the man page for resolv.conf for the format of this 2752b15cb3dSCy Schubert file. 2762b15cb3dSCy Schubert 2772b15cb3dSCy Schubert The following directives are not parsed from the file: sortlist, rotate, 2782b15cb3dSCy Schubert no-check-names, inet6, debug. 2792b15cb3dSCy Schubert 2802b15cb3dSCy Schubert If this function encounters an error, the possible return values are: 1 = 2812b15cb3dSCy Schubert failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of 2822b15cb3dSCy Schubert memory, 5 = short read from file, 6 = no nameservers listed in the file 2832b15cb3dSCy Schubert 2842b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 2852b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 2862b15cb3dSCy Schubert function is evdns_base_resolv_conf_parse(). 2872b15cb3dSCy Schubert 2882b15cb3dSCy Schubert @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC| 2892b15cb3dSCy Schubert DNS_OPTIONS_ALL 2902b15cb3dSCy Schubert @param filename the path to the resolv.conf file 2912b15cb3dSCy Schubert @return 0 if successful, or various positive error codes if an error 2922b15cb3dSCy Schubert occurred (see above) 2932b15cb3dSCy Schubert @see resolv.conf(3), evdns_config_windows_nameservers() 2942b15cb3dSCy Schubert */ 295*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 2962b15cb3dSCy Schubert int evdns_resolv_conf_parse(int flags, const char *const filename); 2972b15cb3dSCy Schubert 2982b15cb3dSCy Schubert /** 2992b15cb3dSCy Schubert Clear the list of search domains. 3002b15cb3dSCy Schubert 3012b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 3022b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 3032b15cb3dSCy Schubert function is evdns_base_search_clear(). 3042b15cb3dSCy Schubert */ 305*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 3062b15cb3dSCy Schubert void evdns_search_clear(void); 3072b15cb3dSCy Schubert 3082b15cb3dSCy Schubert /** 3092b15cb3dSCy Schubert Add a domain to the list of search domains 3102b15cb3dSCy Schubert 3112b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 3122b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 3132b15cb3dSCy Schubert function is evdns_base_search_add(). 3142b15cb3dSCy Schubert 3152b15cb3dSCy Schubert @param domain the domain to be added to the search list 3162b15cb3dSCy Schubert */ 317*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 3182b15cb3dSCy Schubert void evdns_search_add(const char *domain); 3192b15cb3dSCy Schubert 3202b15cb3dSCy Schubert /** 3212b15cb3dSCy Schubert Set the 'ndots' parameter for searches. 3222b15cb3dSCy Schubert 3232b15cb3dSCy Schubert Sets the number of dots which, when found in a name, causes 3242b15cb3dSCy Schubert the first query to be without any search domain. 3252b15cb3dSCy Schubert 3262b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 3272b15cb3dSCy Schubert caller to specify which evdns_base it applies to. The recommended 3282b15cb3dSCy Schubert function is evdns_base_search_ndots_set(). 3292b15cb3dSCy Schubert 3302b15cb3dSCy Schubert @param ndots the new ndots parameter 3312b15cb3dSCy Schubert */ 332*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 3332b15cb3dSCy Schubert void evdns_search_ndots_set(const int ndots); 3342b15cb3dSCy Schubert 3352b15cb3dSCy Schubert /** 3362b15cb3dSCy Schubert As evdns_server_new_with_base. 3372b15cb3dSCy Schubert 3382b15cb3dSCy Schubert @deprecated This function is deprecated because it does not allow the 3392b15cb3dSCy Schubert caller to specify which even_base it uses. The recommended 3402b15cb3dSCy Schubert function is evdns_add_server_port_with_base(). 3412b15cb3dSCy Schubert 3422b15cb3dSCy Schubert */ 343*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 344*a466cc55SCy Schubert struct evdns_server_port * 345*a466cc55SCy Schubert evdns_add_server_port(evutil_socket_t socket, int flags, 346*a466cc55SCy Schubert evdns_request_callback_fn_type callback, void *user_data); 3472b15cb3dSCy Schubert 3482b15cb3dSCy Schubert #ifdef _WIN32 349*a466cc55SCy Schubert EVENT2_EXPORT_SYMBOL 3502b15cb3dSCy Schubert int evdns_config_windows_nameservers(void); 3512b15cb3dSCy Schubert #define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED 3522b15cb3dSCy Schubert #endif 3532b15cb3dSCy Schubert 3542b15cb3dSCy Schubert #ifdef __cplusplus 3552b15cb3dSCy Schubert } 3562b15cb3dSCy Schubert #endif 3572b15cb3dSCy Schubert 3582b15cb3dSCy Schubert #endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ 359