|
Home --> Documentations --> PJLIB-UTIL Reference
srv_resolver.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __PJLIB_UTIL_SRV_RESOLVER_H__
00021 #define __PJLIB_UTIL_SRV_RESOLVER_H__
00022
00027 #include <pjlib-util/resolver.h>
00028
00029 PJ_BEGIN_DECL
00030
00081 typedef enum pj_dns_srv_option
00082 {
00090 PJ_DNS_SRV_FALLBACK_A = 1,
00091
00099 PJ_DNS_SRV_FALLBACK_AAAA = 2,
00100
00107 PJ_DNS_SRV_RESOLVE_AAAA = 4
00108
00109 } pj_dns_srv_option;
00110
00111
00116 typedef struct pj_dns_srv_record
00117 {
00119 unsigned count;
00120
00122 struct
00123 {
00125 unsigned priority;
00126
00128 unsigned weight;
00129
00131 pj_uint16_t port;
00132
00134 pj_dns_a_record server;
00135
00136 } entry[PJ_DNS_SRV_MAX_ADDR];
00137
00138 } pj_dns_srv_record;
00139
00140
00142 typedef struct pj_dns_srv_async_query pj_dns_srv_async_query;
00143
00148 typedef void pj_dns_srv_resolver_cb(void *user_data,
00149 pj_status_t status,
00150 const pj_dns_srv_record *rec);
00151
00152
00183 PJ_DECL(pj_status_t) pj_dns_srv_resolve(const pj_str_t *domain_name,
00184 const pj_str_t *res_name,
00185 unsigned def_port,
00186 pj_pool_t *pool,
00187 pj_dns_resolver *resolver,
00188 unsigned option,
00189 void *token,
00190 pj_dns_srv_resolver_cb *cb,
00191 pj_dns_srv_async_query **p_query);
00192
00193
00203 PJ_DECL(pj_status_t) pj_dns_srv_cancel_query(pj_dns_srv_async_query *query,
00204 pj_bool_t notify);
00205
00206
00211 PJ_END_DECL
00212
00213
00214 #endif
00215
PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
Copyright (C) 2006-2009 Teluu Inc.
|