整體結構分析
主要包含處理各種類型和情況的查詢函數,多數函數僅僅爲該文件內的其它調用,以便方便的完成查詢。ns_query_start()函數向外提供完整的查詢服務。
數據結構
/*% nameserver query structure */
struct ns_query {
unsigned int attributes;
unsigned int restarts;
isc_boolean_t timerset;
dns_name_t * qname;
dns_name_t * origqname;
unsigned int dboptions;
unsigned int fetchoptions;
dns_db_t * gluedb;
dns_db_t * authdb;
dns_zone_t * authzone;
isc_boolean_t authdbset;
isc_boolean_t isreferral;
isc_mutex_t fetchlock;
dns_fetch_t * fetch;
isc_bufferlist_t namebufs;
ISC_LIST(ns_dbversion_t) activeversions;
ISC_LIST(ns_dbversion_t) freeversions;
};
函數調用關係