BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB-UTIL Reference

srv_resolver.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __PJLIB_UTIL_SRV_RESOLVER_H__
20#define __PJLIB_UTIL_SRV_RESOLVER_H__
21
26#include <pjlib-util/resolver.h>
27
29
81{
90
99
107
114
116
117
122typedef struct pj_dns_srv_record
123{
125 unsigned count;
126
128 struct
129 {
131 unsigned priority;
132
134 unsigned weight;
135
138
141
143
145
146
149
154typedef void pj_dns_srv_resolver_cb(void *user_data,
155 pj_status_t status,
156 const pj_dns_srv_record *rec);
157
158
189PJ_DECL(pj_status_t) pj_dns_srv_resolve(const pj_str_t *domain_name,
190 const pj_str_t *res_name,
191 unsigned def_port,
192 pj_pool_t *pool,
193 pj_dns_resolver *resolver,
194 unsigned option,
195 void *token,
197 pj_dns_srv_async_query **p_query);
198
199
210 pj_bool_t notify);
211
212
218
219
220#endif /* __PJLIB_UTIL_SRV_RESOLVER_H__ */
221
#define PJ_DNS_SRV_MAX_ADDR
Definition: config.h:51
int pj_bool_t
unsigned short pj_uint16_t
int pj_status_t
struct pj_dns_resolver pj_dns_resolver
Definition: resolver.h:164
struct pj_dns_srv_async_query pj_dns_srv_async_query
Definition: srv_resolver.h:148
void pj_dns_srv_resolver_cb(void *user_data, pj_status_t status, const pj_dns_srv_record *rec)
Definition: srv_resolver.h:154
pj_dns_srv_option
Definition: srv_resolver.h:81
pj_status_t pj_dns_srv_cancel_query(pj_dns_srv_async_query *query, pj_bool_t notify)
pj_status_t pj_dns_srv_resolve(const pj_str_t *domain_name, const pj_str_t *res_name, unsigned def_port, pj_pool_t *pool, pj_dns_resolver *resolver, unsigned option, void *token, pj_dns_srv_resolver_cb *cb, pj_dns_srv_async_query **p_query)
@ PJ_DNS_SRV_FALLBACK_AAAA
Definition: srv_resolver.h:98
@ PJ_DNS_SRV_RESOLVE_AAAA
Definition: srv_resolver.h:106
@ PJ_DNS_SRV_RESOLVE_AAAA_ONLY
Definition: srv_resolver.h:113
@ PJ_DNS_SRV_FALLBACK_A
Definition: srv_resolver.h:89
#define PJ_BEGIN_DECL
#define PJ_END_DECL
Asynchronous DNS resolver.
Definition: resolver.h:233
Definition: srv_resolver.h:123
unsigned weight
Definition: srv_resolver.h:134
struct pj_dns_srv_record::@5 entry[PJ_DNS_SRV_MAX_ADDR]
unsigned count
Definition: srv_resolver.h:125
pj_uint16_t port
Definition: srv_resolver.h:137
pj_dns_addr_record server
Definition: srv_resolver.h:140
unsigned priority
Definition: srv_resolver.h:131

 


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.