亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? resolver.h

?? 一個開源的sip源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: resolver.h 974 2007-02-19 01:13:53Z bennylp $ */
/* 
 * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
 */
#ifndef __PJLIB_UTIL_RESOLVER_H__
#define __PJLIB_UTIL_RESOLVER_H__

/**
 * @file resolver.h
 * @brief Asynchronous DNS resolver
 */
#include <pjlib-util/dns.h>


PJ_BEGIN_DECL


/**
 * @defgroup PJ_DNS_RESOLVER DNS Asynchronous/Caching Resolution Engine
 * @ingroup PJ_DNS
 * @{
 *
 * This module manages the host/server resolution by performing asynchronous
 * DNS queries and caching the results in the cache. It uses PJLIB-UTIL 
 * low-level DNS parsing functions (see @ref PJ_DNS) and currently supports
 * several types of DNS resource records such as A record (typical query with
 * gethostbyname()) and SRV record.
 *
 * \section PJ_DNS_RESOLVER_FEATURES Features
 *
 * \subsection PJ_DNS_RESOLVER_FEATURES_ASYNC Asynchronous Query and Query Aggregation
 * 
 * The DNS queries are performed asychronously, with timeout setting 
 * configured on per resolver instance basis. Application can issue multiple
 * asynchronous queries simultaneously. Subsequent queries to the same resource
 * (name and DNS resource type) while existing query is still pending will be
 * merged into one query, so that only one DNS request packet is issued.
 * 
 * \subsection PJ_DNS_RESOLVER_FEATURES_RETRANSMISSION Query Retransmission
 *
 * Asynchronous query will be retransmitted if no response is received
 * within the preconfigured time. Once maximum retransmission count is
 * exceeded and no response is received, the query will time out and the
 * callback will be called when error status.
 *
 * \subsection PJ_DNS_RESOLVER_FEATURES_CACHING Response Caching with TTL
 *
 * The resolver instance caches the results returned by nameservers, to
 * enhance the performance by minimizing the message round-trip to the server.
 * The TTL of the cached resposne is calculated from minimum TTL value found 
 * across all resource record (RR) TTL in the response and further more it can
 * be limited to some preconfigured maximum TTL in the resolver. 
 *
 * Response caching can be  disabled by setting the maximum TTL value of the 
 * resolver to zero.
 *
 * \subsection PJ_DNS_RESOLVER_FEATURES_PARALLEL Parallel and Backup Name Servers
 *
 * When the resolver is configured with multiple nameservers, initially the
 * queries will be issued to multiple name servers simultaneously to probe
 * which servers are not active. Once the probing stage is done, subsequent 
 * queries will be directed to only one ACTIVE server which provides the best
 * response time.
 *
 * Name servers are probed periodically to see which nameservers are active
 * and which are down. This probing is done when a query is sent, thus no
 * timer is needed to maintain this. Also probing will be done in parallel
 * so that there would be no additional delay for the query.
 *
 *
 * \subsection PJ_DNS_RESOLVER_FEATURES_REC Supported Resource Records
 *
 * The low-level DNS parsing utility (see @ref PJ_DNS) supports parsing of
 * the following DNS resource records (RR):
 *  - DNS A record
 *  - DNS SRV record
 *  - DNS PTR record
 *  - DNS NS record
 *  - DNS CNAME record
 *
 * For other types of record, application can parse the raw resource 
 * record data (rdata) from the parsed DNS packet (#pj_dns_parsed_packet).
 *
 *
 * \section PJ_DNS_RESOLVER_USING Using the Resolver
 *
 * To use the resolver, application first creates the resolver instance by
 * calling #pj_dns_resolver_create(). If application already has its own
 * timer and ioqueue instances, it can instruct the resolver to use these
 * instances so that application does not need to poll the resolver 
 * periodically to process events. If application does not specify the
 * timer and ioqueue instance for the resolver, an internal timer and
 * ioqueue will be created by the resolver. And since the resolver does not
 * create it's own thread, application MUST poll the resolver periodically
 * by calling #pj_dns_resolver_handle_events() to allow events (network and 
 * timer) to be processed.
 *
 * Next, application MUST configure the nameservers to be used by the
 * resolver, by calling #pj_dns_resolver_set_ns().
 *
 * Application performs asynchronous query by submitting the query with
 * #pj_dns_resolver_start_query(). Once the query completes (either 
 * successfully or times out), the callback will be called.
 *
 * Application can cancel a pending query by calling #pj_dns_resolver_cancel_query().
 *
 * Resolver must be destroyed by calling #pj_dns_resolver_destroy() to
 * release all resources back to the system.
 *
 *
 * \section PJ_DNS_RESOLVER_LIMITATIONS Resolver Limitations
 *
 * Current implementation mainly suffers from a growing memory problem,
 * which mainly is caused by the response caching. Although there is only
 * one cache entry per {query, name} combination, these cache entry will
 * never get deleted since there is no timer is created to invalidate these
 * entries. So the more unique names being queried by application, there more
 * enties will be created in the response cache.
 *
 * Note that a single response entry will occupy about 600-700 bytes of 
 * pool memory (the PJ_DNS_RESOLVER_RES_BUF_SIZE value plus internal
 * structure). 
 *
 * Application can work around this problem by doing one of these:
 *  - disable caching by setting PJ_DNS_RESOLVER_MAX_TTL and 
 *    PJ_DNS_RESOLVER_INVALID_TTL to zero.
 *  - periodically query #pj_dns_resolver_get_cached_count() and destroy-
 *    recreate the resolver to recycle the memory used by the resolver.
 *
 * Note that future improvement may solve this problem by introducing 
 * expiration timer to the cached entries.
 *
 *
 * \section PJ_DNS_RESOLVER_REFERENCE Reference
 *
 * The PJLIB-UTIL resolver was built from the information in the following
 * standards:
 *  - <A HREF="http://www.faqs.org/rfcs/rfc1035.html">
 *    RFC 1035: "Domain names - implementation and specification"</A>
 *  - <A HREF="http://www.faqs.org/rfcs/rfc2782.html">
 *    RFC 2782: "A DNS RR for specifying the location of services (DNS SRV)"
 *    </A>
 */



/**
 * Opaque data type for DNS resolver object.
 */
typedef struct pj_dns_resolver pj_dns_resolver;

/**
 * Opaque data type for asynchronous DNS query object.
 */
typedef struct pj_dns_async_query pj_dns_async_query;

/**
 * Type of asynchronous callback which will be called when the asynchronous
 * query completes.
 *
 * @param user_data	The user data set by application when creating the
 *			asynchronous query.
 * @param status	Status of the DNS resolution.
 * @param response	The response packet received from the server. This
 *			argument may be NULL when status is not PJ_SUCCESS.
 */
typedef void pj_dns_callback(void *user_data,
			     pj_status_t status,
			     pj_dns_parsed_packet *response);


/**
 * This structure describes resolver settings.
 */
typedef struct pj_dns_settings
{
    unsigned	options;	/**< Options flags.			    */
    unsigned	qretr_delay;	/**< Query retransmit delay in msec.	    */
    unsigned	qretr_count;	/**< Query maximum retransmission count.    */
    unsigned	cache_max_ttl;	/**< Maximum TTL for cached responses. If the
				     value is zero, caching is disabled.    */
} pj_dns_settings;


/**
 * Create DNS resolver instance. After the resolver is created, application
 * MUST configure the nameservers with #pj_dns_resolver_set_ns().
 *
 * When creating the resolver, application may specify both timer heap
 * and ioqueue instance, so that it doesn't need to poll the resolver
 * periodically.
 *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品视频在线观看网站| 青娱乐精品视频在线| 成人黄色网址在线观看| 久久久久久亚洲综合影院红桃| 日本成人在线电影网| 精品美女一区二区三区| 精品一区免费av| 国产亚洲精品7777| 国产成人午夜精品影院观看视频 | 国产福利91精品一区二区三区| 精品日韩一区二区三区免费视频| 韩国一区二区视频| 国产精品另类一区| 成人午夜视频福利| 亚洲色图欧洲色图婷婷| 99精品欧美一区二区三区小说| 亚洲一区二区三区四区在线观看 | 在线观看欧美日本| 久久99热这里只有精品| 久久人人爽爽爽人久久久| a亚洲天堂av| 激情文学综合插| 免费观看在线综合色| 一区二区欧美在线观看| 久久九九全国免费| 欧美成人精精品一区二区频| 91蝌蚪porny成人天涯| 久久爱另类一区二区小说| 亚洲综合在线视频| 一区二区三区在线视频免费| 国产欧美精品区一区二区三区 | 天天操天天色综合| 亚洲激情自拍偷拍| 亚洲欧美色一区| 日韩美女视频一区二区| 一区在线中文字幕| 亚洲日本护士毛茸茸| 亚洲天堂久久久久久久| 中文字幕中文在线不卡住| 国产欧美视频在线观看| 欧美国产激情二区三区| 欧美国产激情一区二区三区蜜月| 精品福利在线导航| 欧美国产乱子伦| 亚洲欧美一区二区不卡| 亚洲女同一区二区| 久久亚洲私人国产精品va媚药| 在线看国产一区二区| 91精品欧美综合在线观看最新 | 久久精品视频在线免费观看| 久久嫩草精品久久久久| 精品国产一区二区三区四区四| 欧美麻豆精品久久久久久| 日韩免费一区二区三区在线播放| 欧美一级视频精品观看| 亚洲国产精华液网站w | 亚洲欧美日韩国产中文在线| 一区二区国产盗摄色噜噜| 六月婷婷色综合| 91片黄在线观看| 久久久久久久久97黄色工厂| 亚洲欧美日韩综合aⅴ视频| 久88久久88久久久| 欧美亚男人的天堂| 国产精品视频一二三| 秋霞午夜鲁丝一区二区老狼| 成人黄色一级视频| 久久综合国产精品| 日韩经典中文字幕一区| 91福利视频在线| 1000精品久久久久久久久| 国产主播一区二区三区| 日韩亚洲欧美中文三级| 婷婷夜色潮精品综合在线| 91小宝寻花一区二区三区| 国产精品美女久久久久高潮| 精品一区二区三区日韩| 91精品国产欧美一区二区成人| 国产精品第一页第二页第三页| 国产一区视频在线看| 精品91自产拍在线观看一区| 久色婷婷小香蕉久久| 久久亚洲一级片| 亚洲精选免费视频| 成人黄色免费短视频| 欧美本精品男人aⅴ天堂| 韩国毛片一区二区三区| 正在播放亚洲一区| 狠狠色狠狠色综合日日91app| 日韩精品一区二区三区蜜臀 | 精品在线免费观看| 精品国产一区二区三区久久久蜜月| 毛片av一区二区| 国产精品热久久久久夜色精品三区| 国产aⅴ综合色| 水野朝阳av一区二区三区| 精品久久久久香蕉网| 成人久久视频在线观看| 亚洲大片一区二区三区| 777奇米四色成人影色区| 国产一区二区三区免费观看| 欧美国产精品劲爆| 在线不卡欧美精品一区二区三区| 国产精品主播直播| 亚洲第一综合色| 亚洲欧美aⅴ...| 精品动漫一区二区三区在线观看| av中文字幕不卡| 久久国产人妖系列| 五月婷婷综合网| 自拍偷拍亚洲欧美日韩| 中文字幕巨乱亚洲| 国产色91在线| 国产午夜亚洲精品不卡| 欧美精品一区二区三区四区| 欧美性猛交xxxx乱大交退制版 | 国产校园另类小说区| 欧美一区二区三区啪啪| 欧美精品在线一区二区| 欧美日韩mp4| 日韩一级成人av| 3d成人动漫网站| 91网站黄www| 国产精品996| 国产在线国偷精品产拍免费yy| 亚洲v日本v欧美v久久精品| 中文字幕成人av| 中文字幕亚洲一区二区av在线| 久久在线观看免费| 国产精品理伦片| 一区二区三区欧美日| 日本亚洲电影天堂| 高清shemale亚洲人妖| av在线播放成人| 这里只有精品电影| 久久久影视传媒| 亚洲成人资源在线| 成人av小说网| 欧美一区永久视频免费观看| 精品国产乱码久久久久久夜甘婷婷| 欧美精品一区二区三区蜜桃| 亚洲欧洲日韩综合一区二区| 亚洲chinese男男1069| 久久成人免费电影| 91久久精品国产91性色tv| 欧美xfplay| 图片区小说区国产精品视频| 国产高清不卡一区| 精品裸体舞一区二区三区| 亚洲人成7777| 国产不卡免费视频| 精品国产伦一区二区三区免费| 亚洲人成网站精品片在线观看| 国产在线精品视频| 精品久久久影院| 蜜臀av在线播放一区二区三区| 欧美天天综合网| 日韩一区在线看| 91小宝寻花一区二区三区| 国产精品欧美一区喷水| 黄色日韩三级电影| 久久精品亚洲精品国产欧美 | 久久午夜免费电影| 男女视频一区二区| 日韩精品中午字幕| 欧美96一区二区免费视频| 欧美一级理论性理论a| 午夜av一区二区| 日韩免费高清视频| 久久99精品国产.久久久久久| 91捆绑美女网站| 久久久久97国产精华液好用吗 | 天天综合日日夜夜精品| 欧美一级精品大片| 狠狠网亚洲精品| 《视频一区视频二区| 日本道色综合久久| 免费人成在线不卡| 欧美激情综合五月色丁香小说| 不卡一区二区在线| 日日夜夜精品免费视频| 国产欧美日韩另类一区| 色婷婷香蕉在线一区二区| 石原莉奈在线亚洲二区| 欧美激情中文字幕| 欧美一区二区美女| 99久久伊人网影院| 久久精品国产久精国产爱| 亚洲人成电影网站色mp4| 日韩欧美第一区| 欧美色电影在线| 99视频一区二区三区| 精品在线免费视频| 日本不卡一二三| 亚洲成人先锋电影| 亚洲午夜激情av| 亚洲欧美欧美一区二区三区| 久久久美女毛片| 精品不卡在线视频| 精品精品国产高清一毛片一天堂|