sresolv  1.12.11devel
sresolv.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Sofia-SIP package
3  *
4  * Copyright (C) 2005 Nokia Corporation.
5  *
6  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24 
25 #ifndef SRESOLV_H
27 #define SRESOLV_H
28 
38 #include <sofia-sip/su.h>
39 #include <sofia-sip/su_wait.h>
40 #include <sofia-sip/su_tag.h>
41 
42 #include <sofia-resolv/sres.h>
45 
46 SOFIA_BEGIN_DECLS
47 
48 /* Sofia-specific reactor interface for asynchronous operation */
49 
51 #define SRESOLVTAG_ANY() srestag_any, ((tag_value_t)0)
52 SOFIAPUBVAR tag_typedef_t srestag_any;
53 
54 SOFIAPUBVAR tag_typedef_t srestag_resolv_conf;
56 #define SRESTAG_RESOLV_CONF(x) srestag_resolv_conf, tag_str_v((x))
57 SOFIAPUBVAR tag_typedef_t srestag_resolv_conf_ref;
58 #define SRESTAG_RESOLV_CONF_REF(x) srestag_resolv_conf_ref, tag_str_vr(&(x))
59 
60 SOFIAPUBVAR tag_typedef_t srestag_cache;
62 #define SRESTAG_CACHE(x) srestag_cache, tag_ptr_v((x))
63 SOFIAPUBVAR tag_typedef_t srestag_cache_ref;
64 #define SRESTAG_CACHE_REF(x) srestag_cache_ref, tag_ptr_vr(&(x), (x))
65 
68  char const *resolv_conf,
70  ...);
73 
74 /* Return socket used by root. @deprecated */
76 
77 SOFIA_END_DECLS
78 
79 #endif
Sofia DNS Resolver.
struct sres_resolver_s sres_resolver_t
Opaque type of DNS resolver object.
Definition: sres.h:95
Asynchronous interface for Sofia DNS Resolver.
Sofia DNS Resolver Records.
int sres_resolver_destroy(sres_resolver_t *res)
Destroy a resolver object.
Definition: sresolv.c:154
sres_resolver_t * sres_resolver_create(su_root_t *root, char const *resolv_conf, tag_type_t, tag_value_t,...)
Create a resolver object using root reactor.
Definition: sresolv.c:100
su_socket_t sres_resolver_root_socket(sres_resolver_t *res)
Return a socket registered to su_root_t object.
Definition: sresolv.c:287
int su_socket_t
#define SOFIAPUBFUN
#define SOFIAPUBVAR
struct tag_type_s const tag_typedef_t[1]
intptr_t tag_value_t
struct tag_type_s const * tag_type_t
struct su_root_t su_root_t

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.