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

srv_resolver.h
Go to the documentation of this file.
1 /* $Id: srv_resolver.h 5349 2016-06-20 10:10:42Z nanang $ */
2 /*
3  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 #ifndef __PJLIB_UTIL_SRV_RESOLVER_H__
21 #define __PJLIB_UTIL_SRV_RESOLVER_H__
22 
27 #include <pjlib-util/resolver.h>
28 
30 
81 typedef enum pj_dns_srv_option
82 {
91 
100 
108 
115 
117 
118 
123 typedef struct pj_dns_srv_record
124 {
126  unsigned count;
127 
129  struct
130  {
132  unsigned priority;
133 
135  unsigned weight;
136 
139 
142 
144 
146 
147 
150 
156  pj_status_t status,
157  const pj_dns_srv_record *rec);
158 
159 
190 PJ_DECL(pj_status_t) pj_dns_srv_resolve(const pj_str_t *domain_name,
191  const pj_str_t *res_name,
192  unsigned def_port,
193  pj_pool_t *pool,
194  pj_dns_resolver *resolver,
195  unsigned option,
196  void *token,
198  pj_dns_srv_async_query **p_query);
199 
200 
211  pj_bool_t notify);
212 
213 
218 PJ_END_DECL
219 
220 
221 #endif /* __PJLIB_UTIL_SRV_RESOLVER_H__ */
222 
pj_dns_addr_record server
Definition: srv_resolver.h:141
struct pj_dns_resolver pj_dns_resolver
Definition: resolver.h:165
int pj_bool_t
Definition: srv_resolver.h:107
void * user_data
Definition: srv_resolver.h:99
Definition: srv_resolver.h:114
Definition: resolver.h:233
int pj_status_t
Definition: srv_resolver.h:123
pj_dns_srv_option
Definition: srv_resolver.h:81
struct pj_dns_srv_record::@5 entry[PJ_DNS_SRV_MAX_ADDR]
void pj_dns_srv_resolver_cb(void *user_data, pj_status_t status, const pj_dns_srv_record *rec)
Definition: srv_resolver.h:155
pj_status_t pj_dns_srv_cancel_query(pj_dns_srv_async_query *query, pj_bool_t notify)
#define PJ_BEGIN_DECL
Definition: srv_resolver.h:90
#define PJ_DNS_SRV_MAX_ADDR
Definition: config.h:52
unsigned priority
Definition: srv_resolver.h:132
unsigned count
Definition: srv_resolver.h:126
pj_uint16_t port
Definition: srv_resolver.h:138
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)
unsigned weight
Definition: srv_resolver.h:135
Asynchronous DNS resolver.
unsigned short pj_uint16_t
struct pj_dns_srv_async_query pj_dns_srv_async_query
Definition: srv_resolver.h:149

 


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.