sresolv
1.12.11
|
00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef SRESOLV_H 00026 00027 #define SRESOLV_H 00028 00038 #include <sofia-sip/su.h> 00039 #include <sofia-sip/su_wait.h> 00040 #include <sofia-sip/su_tag.h> 00041 00042 #include <sofia-resolv/sres.h> 00043 #include <sofia-resolv/sres_record.h> 00044 #include <sofia-resolv/sres_async.h> 00045 00046 SOFIA_BEGIN_DECLS 00047 00048 /* Sofia-specific reactor interface for asynchronous operation */ 00049 00051 #define SRESOLVTAG_ANY() srestag_any, ((tag_value_t)0) 00052 SOFIAPUBVAR tag_typedef_t srestag_any; 00053 00054 SOFIAPUBVAR tag_typedef_t srestag_resolv_conf; 00056 #define SRESTAG_RESOLV_CONF(x) srestag_resolv_conf, tag_str_v((x)) 00057 SOFIAPUBVAR tag_typedef_t srestag_resolv_conf_ref; 00058 #define SRESTAG_RESOLV_CONF_REF(x) srestag_resolv_conf_ref, tag_str_vr(&(x)) 00059 00060 SOFIAPUBVAR tag_typedef_t srestag_cache; 00062 #define SRESTAG_CACHE(x) srestag_cache, tag_ptr_v((x)) 00063 SOFIAPUBVAR tag_typedef_t srestag_cache_ref; 00064 #define SRESTAG_CACHE_REF(x) srestag_cache_ref, tag_ptr_vr(&(x), (x)) 00065 00067 SOFIAPUBFUN sres_resolver_t *sres_resolver_create(su_root_t *root, 00068 char const *resolv_conf, 00069 tag_type_t, tag_value_t, 00070 ...); 00072 SOFIAPUBFUN int sres_resolver_destroy(sres_resolver_t *res); 00073 00074 /* Return socket used by root. @deprecated */ 00075 SOFIAPUBFUN su_socket_t sres_resolver_root_socket(sres_resolver_t *res); 00076 00077 SOFIA_END_DECLS 00078 00079 #endif