3 v5f͒@s ddlmZedkr&ddZeZ[n"edkr@ddZeZ[nddlZ[yeZWnek rfYnXy ddlZ Wne k rddl Z YnXdd d Z d d Z ddZ ddZy eZd ZWn(e jk rGdddZdZYnXddZejZGdddeZejZeeejZejZejZejZejZejZejZejZejZejZej Z ej!Z!ej"Z"ej#Z#ej$Z$ej%Z%ej&Z&ej'Z'ej(Z(ej)Z)ej*Z*ej+Z+ej,Z,ej-Z-ej.Z.ej/Z/ej0Z0ej1Z1ej2Z2ej3Z3ej4Z4ej5Z5ej6Z6ej7Z7ej8Z8ej9Z9ej:Z:ej;Z;ejZ>ej?Z?ej@Z@ejAZAejBZBejCZCejDZDejEZEejFZFejGZGejHZHejIZIejJZJejKZKejLZLejMZMejNZNejOZOejPZPejQZQejRZRejSZSejTZTejUZUejVZVejWZWejXZXddZYejYZYddZZejZZZddZ[ej[Z[GdddeZ\ej]Z]e]e\d d!Z^ej^Z^d"d#Z_ej_Z_d$d%Z`ej`Z`Gd&d'd'eZaejbZbebeaGd(d)d)eZcejdZdedecGd*d+d+eZeejfZfefeeGd,d-d-ZgGd.d/d/ZhGd0d1d1Zid2d3ZjejjZjd4d5ZkejkZkd6d7ZlejlZld8d9ZmejmZmGd:d;d;eZnejoZoeoenGdd?d?eZrejsZseserGd@dAdAZtGdBdCdCZudDdEZvejvZvdFdGZwejwZwGdHdIdIeZxejyZyeyexdJdKZzejzZzdLdMZ{ej{Z{dNdOZ|ej|Z|dPdQZ}ej}Z}dRdSZ~ej~Z~dTdUZejZdVdWZejZGdXdYdYeZejZeeGdZd[d[eZejZeeGd\d]d]eZejZeeGd^d_d_eZejZeed`daZejZdbdcZejZGdddedeeZejZeedfdgZejZGdhdidieZejZeedjdkZejZGdldmdmeZejZeeejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZGdndodoZGdpdqdqZdrdsZejZdtduZejZdvdwZejZdxdyZejZdzd{ZejZd|d}ZejZd~dZejZddZejZddZejZGdddeZejZeeGdddeZejZeeGdddeZejZeeGdddeZejZeeGdddeZejZeeGdddeZejZeeddZejZddZejZddZejZddZejZddZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZejZddZejZGdddZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddZejZddÄZejZddńZejZddDŽZejZddɄZejZdd˄ZejZdd̈́ZejZdddЄZdd҄ZejZddԄZejZddքZejZdd؄ZejZddڄZejZdd܄Z ej Z ddބZ ej Z ddZ ej Z dS)) version_infoc CsTddl}tjdd}dj|dfjd}y |j|Stk rN|jdSXdS)Nr._unboundmodule) importlib__name__ rpartitionjoinlstrip import_module ImportError)rZpkgZmnamer%/usr/lib64/python3.6/unboundmodule.pyswig_import_helper s rcCs~ddlm}ddl}d}y|jd|tg\}}}Wntk rPddl}|SXz|jd|||}Wd|dk rx|jX|S)Nr)dirnamer) Zos.pathrimp find_module__file__r r load_moduleclose)rrfppathname descriptionrZ_modrrrrs  NcCs|dkr|jj|S|dkr8t|jdkr8||j|<dS|jj|d}|rT|||S|sxtrltj |||q||j|<n t d|dS)NthisownthisZ SwigPyObjectzYou cannot add attributes to %s) rowntyper__dict____swig_setmethods__get _newclassobject __setattr__AttributeError)self class_typenamevalueZstaticmethodrrr_swig_setattr_nondynamic3s    r,cCst||||dS)Nr)r,)r'r(r)r*rrr _swig_setattrFsr-cCsB|dkr|jjS|jj|d}|r,||Std|j|fdS)Nrz!'%s' object has no attribute '%s')rr__swig_getmethods__r"r&r)r'r(r)r+rrr _swig_getattrJs  r/c CsDyd|jj}Wntjk r,d}YnXd|jj|jj|fS)Nz proxy of z <%s.%s; %s >)r__repr__ __builtin__ Exception __class__ __module__r)r'Zstrthisrrr _swig_reprSs  r6c@s eZdZdS)_objectN)rr5 __qualname__rrrrr7^sr7cCs tj||S)N)rGetNameAsLabelList)r)lenrrrr9csr9c@seZdZiZddZiZddZeZe j ed<e rhszquery_info.cCs t|t|S)N)r/r;)r'r)rrrr<jsqtypeqclasscCs t|jS)N)sldns_wire2str_typer=)r'rrr_get_qtype_strsszquery_info._get_qtype_strcCs t|jS)N)sldns_wire2str_classr>)r'rrr_get_qclass_strvszquery_info._get_qclass_strcCs t|jS)N) dnameAsStrqname)r'rrr_get_qname_str}szquery_info._get_qname_strc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_query_inforappendr2r3)r'rrrr__init__s zquery_info.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r. __getattr__r6r1rZquery_info_qtype_getr#_swig_propertyr=Zquery_info_qclass_getr>r@propertyZ qtype_strrBZ qclass_str _get_qnamerD_get_qname_componentsZ qname_listrEZ qname_strrGZdelete_query_info__swig_destroy____del__rrrrr;fs,      r;cCs tj|S)N)rrK)qrrrrKsrKcCs tj|S)N)rrL)rOrrrrLsrLcCs tj|S)N)rrC)dnamerrrrCsrCc@seZdZiZddZiZddZeZe j ed<e rcCs t|t|S)N)r/rQ)r'r)rrrr<sflagsr rrset_classcCsttj|jS)N)r?rntohsr)r'rrr _get_type_strszpacked_rrset_key._get_type_strcCsttj|jS)N)rArrTrS)r'rrr_get_class_strszpacked_rrset_key._get_class_strcCs t|jS)N)rCrP)r'rrr_get_dname_strszpacked_rrset_key._get_dname_strc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_packed_rrset_keyrrFr2r3)r'rrrrrGs zpacked_rrset_key.__init__cCsdS)Nr)r'rrrr<sN)!rr5r8r!r%r.rHr6r1rZpacked_rrset_key_flags_getr#rIrRZpacked_rrset_key_type_getrZ packed_rrset_key_rrset_class_getrSrUrJZtype_strrVZrrset_class_str _get_dnamerP_get_dname_components dname_listrW dname_strrGZdelete_packed_rrset_keyrMrNrrrrrQs2        rQcCs tj|S)N)rrT)ZnetshortrrrrTsrTcCs tj|S)N)rrX)krrrrX srXcCs tj|S)N)rrY)r\rrrrY srYc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZddZe jZd dZd S) ub_packed_rrset_keycCst|t||S)N)r-r])r'r)r*rrrr<szub_packed_rrset_key.cCs t|t|S)N)r/r])r'r)rrrr<sentryidrkc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_ub_packed_rrset_keyrrFr2r3)r'rrrrrG#s zub_packed_rrset_key.__init__cCsdS)Nr)r'rrrr<*sN)rr5r8r!r%r.rHr6r1rZub_packed_rrset_key_entry_setZub_packed_rrset_key_entry_getr#rIr^Zub_packed_rrset_key_id_setZub_packed_rrset_key_id_getr_Zub_packed_rrset_key_rk_setZub_packed_rrset_key_rk_getr`rGZdelete_ub_packed_rrset_keyrMrNrrrrr]s(      r]c@sLeZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ d d Z!e j"Z#d dZ$dS) lruhash_entrycCst|t||S)N)r-ra)r'r)r*rrrr<0szlruhash_entry.cCs t|t|S)N)r/ra)r'r)rrrr<2slock overflow_nextlru_nextlru_prevhashkeydatac Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_lruhash_entryrrFr2r3)r'rrrrrGQs zlruhash_entry.__init__cCsdS)Nr)r'rrrr<XsN)%rr5r8r!r%r.rHr6r1rZlruhash_entry_lock_setZlruhash_entry_lock_getr#rIrbZlruhash_entry_overflow_next_setZlruhash_entry_overflow_next_getrcZlruhash_entry_lru_next_setZlruhash_entry_lru_next_getrdZlruhash_entry_lru_prev_setZlruhash_entry_lru_prev_getreZlruhash_entry_hash_setZlruhash_entry_hash_getrfZlruhash_entry_key_setZlruhash_entry_key_getrgZlruhash_entry_data_setZlruhash_entry_data_getrhrGZdelete_lruhash_entryrMrNrrrrra.sH              rac@s,eZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZd d ZeeZd d ZeeZd dZ ee Z!ddZ"e j#Z$ddZ%dS)packed_rrset_datacCst|t||S)N)r-ri)r'r)r*rrrr<^szpacked_rrset_data.cCs t|t|S)N)r/ri)r'r)rrrr<`sttlcount rrsig_counttrustsecuritycCst|S)N)RRSetData_RRLen)r'rrr_get_data_rr_lenwsz"packed_rrset_data._get_data_rr_lencCst|S)N)RRSetData_RRTTL)r'rrr_get_data_rr_ttlysz"packed_rrset_data._get_data_rr_ttlcCst|S)N)RRSetData_RRData)r'rrr_get_data_rr_data{sz#packed_rrset_data._get_data_rr_datac Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_packed_rrset_datarrFr2r3)r'rrrrrGs zpacked_rrset_data.__init__cCsdS)Nr)r'rrrr<sN)&rr5r8r!r%r.rHr6r1rZpacked_rrset_data_ttl_setZpacked_rrset_data_ttl_getr#rIrjZpacked_rrset_data_count_setZpacked_rrset_data_count_getrkZ!packed_rrset_data_rrsig_count_setZ!packed_rrset_data_rrsig_count_getrlZpacked_rrset_data_trust_setZpacked_rrset_data_trust_getrmZpacked_rrset_data_security_setZpacked_rrset_data_security_getrnrprJZrr_lenrrZrr_ttlrtZrr_datarGZdelete_packed_rrset_datarMrNrrrrri\sD          ric@s$eZdZddZddZddZdS)rocCs ||_dS)N)obj)r'rurrrrGszRRSetData_RRLen.__init__cCstj|j|S)N)rrpru)r'indexrrr __getitem__szRRSetData_RRLen.__getitem__cCs|jj|jjS)N)rurkrl)r'rrr__len__szRRSetData_RRLen.__len__N)rr5r8rGrwrxrrrrrosroc@s,eZdZddZddZddZddZd S) rqcCs ||_dS)N)ru)r'rurrrrGszRRSetData_RRTTL.__init__cCstj|j|S)N)rrrru)r'rvrrrrwszRRSetData_RRTTL.__getitem__cCstj|j||dS)N)r_set_data_rr_ttlru)r'rvr*rrr __setitem__szRRSetData_RRTTL.__setitem__cCs|jj|jjS)N)rurkrl)r'rrrrxszRRSetData_RRTTL.__len__N)rr5r8rGrwrzrxrrrrrqsrqc@s$eZdZddZddZddZdS)rscCs ||_dS)N)ru)r'rurrrrGszRRSetData_RRData.__init__cCstj|j|S)N)rrtru)r'rvrrrrwszRRSetData_RRData.__getitem__cCs|jj|jjS)N)rurkrl)r'rrrrxszRRSetData_RRData.__len__N)rr5r8rGrwrxrrrrrssrscCs tj||S)N)rrp)didxrrrrpsrpcCstj|||S)N)rry)r{r|rjrrrrysrycCs tj||S)N)rrr)r{r|rrrrrsrrcCs tj||S)N)rrt)r{r|rrrrtsrtc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ e j!ed <e j"ed <e rZe e j"e j!Z#e j$ed <e j%ed <e re e j%e j$Z&e j'ed <e j(ed <e re e j(e j'Z)ddZ*e+e*Z,ddZ-e+e-Z.ddZ/e j0Z1ddZ2dS) reply_infocCst|t||S)N)r-r})r'r)r*rrrr<szreply_info.cCs t|t|S)N)r/r})r'r)rrrr<srRqdcountrj prefetch_ttl authoritativern an_numrrsets ns_numrrsets ar_numrrsets rrset_countcCst|S)N) ReplyInfo_Ref)r'rrr_rrset_ref_getszreply_info._rrset_ref_getcCst|S)N)ReplyInfo_RRSet)r'rrr_rrset_rrsets_getszreply_info._rrset_rrsets_getc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_reply_inforrFr2r3)r'rrrrrGs zreply_info.__init__cCsdS)Nr)r'rrrr<sN)3rr5r8r!r%r.rHr6r1rZreply_info_flags_setZreply_info_flags_getr#rIrRZreply_info_qdcount_setZreply_info_qdcount_getr~Zreply_info_ttl_setZreply_info_ttl_getrjZreply_info_prefetch_ttl_setZreply_info_prefetch_ttl_getrZreply_info_authoritative_setZreply_info_authoritative_getrZreply_info_security_setZreply_info_security_getrnZreply_info_an_numrrsets_setZreply_info_an_numrrsets_getrZreply_info_ns_numrrsets_setZreply_info_ns_numrrsets_getrZreply_info_ar_numrrsets_setZreply_info_ar_numrrsets_getrZreply_info_rrset_count_setZreply_info_rrset_count_getrrrJrefrZrrsetsrGZdelete_reply_inforMrNrrrrr}sh                    r}c@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZddZe jZddZd S) rrset_refcCst|t||S)N)r-r)r'r)r*rrrr<szrrset_ref.cCs t|t|S)N)r/r)r'r)rrrr<srgr_c Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZ new_rrset_refrrFr2r3)r'rrrrrGs zrrset_ref.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r.rHr6r1rZrrset_ref_key_setZrrset_ref_key_getr#rIrgZrrset_ref_id_setZrrset_ref_id_getr_rGZdelete_rrset_refrMrNrrrrrs     rc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZddZe jZddZd S) dns_msgcCst|t||S)N)r-r)r'r)r*rrrr<szdns_msg.cCs t|t|S)N)r/r)r'r)rrrr<sqinforepc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZ new_dns_msgrrFr2r3)r'rrrrrGs zdns_msg.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r.rHr6r1rZdns_msg_qinfo_setZdns_msg_qinfo_getr#rIrZdns_msg_rep_setZdns_msg_rep_getrrGZdelete_dns_msgrMrNrrrrrs     rc@s$eZdZddZddZddZdS)rcCs ||_dS)N)ru)r'rurrrrG szReplyInfo_RRSet.__init__cCstj|j|S)N)rrru)r'rvrrrrw!szReplyInfo_RRSet.__getitem__cCs|jjS)N)rur)r'rrrrx"szReplyInfo_RRSet.__len__N)rr5r8rGrwrxrrrrrsrc@s$eZdZddZddZddZdS)rcCs ||_dS)N)ru)r'rurrrrG%szReplyInfo_Ref.__init__cCstj|j|S)N)rrru)r'rvrrrrw&szReplyInfo_Ref.__getitem__cCs|jjS)N)rur)r'rrrrx'szReplyInfo_Ref.__len__N)rr5r8rGrwrxrrrrr$srcCs tj||S)N)rr)rr|rrrr*srcCs tj||S)N)rr)rr|rrrr.src@seZdZiZddZiZddZeZddZ e e Z ddZ e e Z dd Ze eZd d Ze eZd d Ze eZddZe eZddZejZddZdS)sockaddr_storagecCst|t||S)N)r-r)r'r)r*rrrr<3szsockaddr_storage.cCs t|t|S)N)r/r)r'r)rrrr<5scCst|S)N)_sockaddr_storage_family)r'rrr _family_get8szsockaddr_storage._family_getcCst|S)N)_sockaddr_storage_addr)r'rrr _addr_get;szsockaddr_storage._addr_getcCst|S)N)_sockaddr_storage_raw_addr)r'rrr _raw_addr_get>szsockaddr_storage._raw_addr_getcCst|S)N)_sockaddr_storage_port)r'rrr _port_getAszsockaddr_storage._port_getcCst|S)N)_sockaddr_storage_flowinfo)r'rrr _flowinfo_getDszsockaddr_storage._flowinfo_getcCst|S)N)_sockaddr_storage_scope_id)r'rrr _scope_id_getGszsockaddr_storage._scope_id_getc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_sockaddr_storagerrFr2r3)r'rrrrrGKs zsockaddr_storage.__init__cCsdS)Nr)r'rrrr<RsN)rr5r8r!r%r.rHr6r1rrJfamilyraddrrZraw_addrrportrZflowinforZscope_idrGrZdelete_sockaddr_storagerMrNrrrrr1s(rcCs tj|S)N)r_sockaddr_storage_len)ssrrrrWsrcCs tj|S)N)rr)rrrrr[srcCs tj|S)N)rr)rrrrr_srcCs tj|S)N)rr)rrrrrcsrcCs tj|S)N)rr)rrrrrgsrcCs tj|S)N)rr)rrrrrksrcCs tj|S)N)rr)rrrrrosrc@sdeZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j ZddZe jZddZdS) mesh_statecCst|t||S)N)r-r)r'r)r*rrrr<tszmesh_state.cCs t|t|S)N)r/r)r'r)rrrr<vs reply_listc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_mesh_staterrFr2r3)r'rrrrrG}s zmesh_state.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r.rHr6r1rZmesh_state_reply_list_setZmesh_state_reply_list_getr#rIrrGZdelete_mesh_staterMrNrrrrrrs  rc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZddZe jZddZd S) mesh_replycCst|t||S)N)r-r)r'r)r*rrrr<szmesh_reply.cCs t|t|S)N)r/r)r'r)rrrr<snext query_replyc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_mesh_replyrrFr2r3)r'rrrrrGs zmesh_reply.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r.rHr6r1rZmesh_reply_next_setZmesh_reply_next_getr#rIrZmesh_reply_query_reply_setZmesh_reply_query_reply_getrrGZdelete_mesh_replyrMrNrrrrrs     rc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j ZddZeeZddZeeZd d ZeeZd d Ze jZd dZdS) comm_replycCst|t||S)N)r-r)r'r)r*rrrr<szcomm_reply.cCs t|t|S)N)r/r)r'r)rrrr<s_addrcCs t|jS)N)rr)r'rrrrszcomm_reply._addr_getcCs t|jS)N)rr)r'rrrrszcomm_reply._port_getcCs t|jS)N)rr)r'rrrrszcomm_reply._family_getc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_comm_replyrrFr2r3)r'rrrrrGs zcomm_reply.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r.rHr6r1rZcomm_reply__addr_setZcomm_reply__addr_getr#rIrrrJrrrrrrGZdelete_comm_replyrMrNrrrrrs$  rc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZdd ZeeZd d ZeeZd d Ze jZddZ dS) edns_optioncCst|t||S)N)r-r)r'r)r*rrrr<szedns_option.cCs t|t|S)N)r/r)r'r)rrrr<s_next _opt_code_opt_len _opt_datacCst|S)N)_edns_option_opt_code_get)r'rrr _opt_code_getszedns_option._opt_code_getcCst|S)N)_edns_option_opt_data_get)r'rrr _opt_data_getszedns_option._opt_data_getc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_edns_optionrrFr2r3)r'rrrrrGs zedns_option.__init__cCsdS)Nr)r'rrrr<sN)!rr5r8r!r%r.rHr6r1rZedns_option__next_setZedns_option__next_getr#rIrZedns_option__opt_code_setZedns_option__opt_code_getrZedns_option__opt_len_setZedns_option__opt_len_getrZedns_option__opt_data_setZedns_option__opt_data_getrrrJcoderrhrGZdelete_edns_optionrMrNrrrrrs8        rcCs tj|S)N)rr)optionrrrrsrcCs tj|S)N)rr)rrrrrsrc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ e j!ed <e j"ed <e rZe e j"e j!Z#e j$ed <e j%ed <e re e j%e j$Z&d dZ'e(e'Z)ddZ*e(e*Z+ddZ,e j-Z.ddZ/dS) edns_datacCst|t||S)N)r-r)r'r)r*rrrr<szedns_data.cCs t|t|S)N)r/r)r'r)rrrr<s edns_present ext_rcode edns_versionbitsudp_size opt_list_in opt_list_outopt_list_inplace_cb_outpadding_block_sizecCs t|jS)N)EdnsOptsListIteropt_list)r'rrr_opt_list_iterszedns_data._opt_list_itercCst|S)N)_edns_data_opt_list_get)r'rrr _opt_list szedns_data._opt_listc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZ new_edns_datarrFr2r3)r'rrrrrG$s zedns_data.__init__cCsdS)Nr)r'rrrr<+sN)0rr5r8r!r%r.rHr6r1rZedns_data_edns_present_setZedns_data_edns_present_getr#rIrZedns_data_ext_rcode_setZedns_data_ext_rcode_getrZedns_data_edns_version_setZedns_data_edns_version_getrZedns_data_bits_setZedns_data_bits_getrZedns_data_udp_size_setZedns_data_udp_size_getrZedns_data_opt_list_in_setZedns_data_opt_list_in_getrZedns_data_opt_list_out_setZedns_data_opt_list_out_getrZ%edns_data_opt_list_inplace_cb_out_setZ%edns_data_opt_list_inplace_cb_out_getrZ edns_data_padding_block_size_setZ edns_data_padding_block_size_getrrrJZ opt_list_iterrrrGZdelete_edns_datarMrNrrrrrs`                  rcCs tj|S)N)rr)Zednsrrrr0src@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ e j!ed <e j"ed <e rZe e j"e j!Z#e j$ed <e j%ed <e re e j%e j$Z&e j'ed <e j(ed <e re e j(e j'Z)e j*ed<e j+ed<e re e j+e j*Z,e j-ed<e j.ed<e re e j.e j-Z/e j0ed<e j1ed<e r"e e j1e j0Z2e j3ed<e j4ed<e rJe e j4e j3Z5e j6ed<e j7ed<e rre e j7e j6Z8e j9ed<e j:ed<e re e j:e j9Z;e je j?ed<e j@ed<e re e j@e j?ZAe jBed<e jCed<e re e jCe jBZDe jEed<e jFed<e r:e e jFe jEZGe jHed<e jIed<e rbe e jIe jHZJe jKed<e jLed<e re e jLe jKZMe jNed<e jOed<e re e jOe jNZPe jQed<e jRed<e re e jRe jQZSe jTed<e jUed<e re e jUe jTZVe jWed<e jXed<e r*e e jXe jWZYe jZed<e j[ed<e rRe e j[e jZZ\e j]ed<e j^ed<e rze e j^e j]Z_d d!Z`eae`Zbd"d#Zce jdZed$dZfd%S)& module_envcCst|t||S)N)r-r)r'r)r*rrrr<5szmodule_env.cCs t|t|S)N)r/r)r'r)rrrr<7scfg msg_cache rrset_cache infra_cache key_cache send_query detach_subs attach_subkill_sub detect_cyclescratchscratch_bufferworkermeshallocrnd_now_now_tvneed_to_validateanchors neg_cache probe_timerfwdshintsmodinfoinplace_cb_listsedns_known_optionsedns_known_options_numcCst|S)N)_module_env_now_get)r'rrr_now_getszmodule_env._now_getc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_module_envrrFr2r3)r'rrrrrGs zmodule_env.__init__cCsdS)Nr)r'rrrr<sN)grr5r8r!r%r.rHr6r1rZmodule_env_cfg_setZmodule_env_cfg_getr#rIrZmodule_env_msg_cache_setZmodule_env_msg_cache_getrZmodule_env_rrset_cache_setZmodule_env_rrset_cache_getrZmodule_env_infra_cache_setZmodule_env_infra_cache_getrZmodule_env_key_cache_setZmodule_env_key_cache_getrZmodule_env_send_query_setZmodule_env_send_query_getrZmodule_env_detach_subs_setZmodule_env_detach_subs_getrZmodule_env_attach_sub_setZmodule_env_attach_sub_getrZmodule_env_kill_sub_setZmodule_env_kill_sub_getrZmodule_env_detect_cycle_setZmodule_env_detect_cycle_getrZmodule_env_scratch_setZmodule_env_scratch_getrZmodule_env_scratch_buffer_setZmodule_env_scratch_buffer_getrZmodule_env_worker_setZmodule_env_worker_getrZmodule_env_mesh_setZmodule_env_mesh_getrZmodule_env_alloc_setZmodule_env_alloc_getrZmodule_env_rnd_setZmodule_env_rnd_getrZmodule_env__now_setZmodule_env__now_getrZmodule_env__now_tv_setZmodule_env__now_tv_getrZmodule_env_need_to_validate_setZmodule_env_need_to_validate_getrZmodule_env_anchors_setZmodule_env_anchors_getrZmodule_env_neg_cache_setZmodule_env_neg_cache_getrZmodule_env_probe_timer_setZmodule_env_probe_timer_getrZmodule_env_fwds_setZmodule_env_fwds_getrZmodule_env_hints_setZmodule_env_hints_getrZmodule_env_modinfo_setZmodule_env_modinfo_getrZmodule_env_inplace_cb_lists_setZmodule_env_inplace_cb_lists_getrZ!module_env_edns_known_options_setZ!module_env_edns_known_options_getrZ%module_env_edns_known_options_num_setZ%module_env_edns_known_options_num_getrrrJZnowrGZdelete_module_envrMrNrrrrr3s                                                        rcCs tj|S)N)rr)envrrrrsrc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ e j!ed <e j"ed <e rZe e j"e j!Z#e j$ed <e j%ed <e re e j%e j$Z&e j'ed <e j(ed <e re e j(e j'Z)e j*ed<e j+ed<e re e j+e j*Z,e j-ed<e j.ed<e re e j.e j-Z/e j0ed<e j1ed<e r"e e j1e j0Z2e j3ed<e j4ed<e rJe e j4e j3Z5ddZ6ddZ7e8e7Z9ddZ:e8e:Z;ddZe8e>Z?ddZ@e8e@ZAddZBe8eBZCd d!ZDe8eDZEd"d#ZFe8eFZGd$d%ZHe8eHZId&d'ZJe jKZLd(dZMd)S)* module_qstatecCst|t||S)N)r-r)r'r)r*rrrr<szmodule_qstate.cCs t|t|S)N)r/r)r'r)rrrr<sr query_flags is_priming is_valrecreply return_msg return_rcoderegioncurmodprefetch_leewayr mesh_infono_cache_lookupno_cache_storecCstj|||dS)zSets the ext stateN)r_ext_state_set)r'r_staterrr set_ext_stateszmodule_qstate.set_ext_statecCst|S)N)ExtState)r'rrrZ__ext_state_getszmodule_qstate.__ext_state_getcCs t|jS)N)redns_opts_front_in)r'rrr_edns_opts_front_in_itersz&module_qstate._edns_opts_front_in_itercCs t|jS)N)redns_opts_back_out)r'rrr_edns_opts_back_out_itersz&module_qstate._edns_opts_back_out_itercCs t|jS)N)redns_opts_back_in)r'rrr_edns_opts_back_in_itersz%module_qstate._edns_opts_back_in_itercCs t|jS)N)redns_opts_front_out)r'rrr_edns_opts_front_out_iter sz'module_qstate._edns_opts_front_out_itercCst|S)N)_edns_opts_front_in_get)r'rrr_edns_opts_front_in sz!module_qstate._edns_opts_front_incCst|S)N)_edns_opts_back_out_get)r'rrr_edns_opts_back_outsz!module_qstate._edns_opts_back_outcCst|S)N)_edns_opts_back_in_get)r'rrr_edns_opts_back_insz module_qstate._edns_opts_back_incCst|S)N)_edns_opts_front_out_get)r'rrr_edns_opts_front_outsz"module_qstate._edns_opts_front_outc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_module_qstaterrFr2r3)r'rrrrrGs zmodule_qstate.__init__cCsdS)Nr)r'rrrr<sN)Nrr5r8r!r%r.rHr6r1rZmodule_qstate_qinfo_setZmodule_qstate_qinfo_getr#rIrZmodule_qstate_query_flags_setZmodule_qstate_query_flags_getrZmodule_qstate_is_priming_setZmodule_qstate_is_priming_getrZmodule_qstate_is_valrec_setZmodule_qstate_is_valrec_getrZmodule_qstate_reply_setZmodule_qstate_reply_getrZmodule_qstate_return_msg_setZmodule_qstate_return_msg_getrZmodule_qstate_return_rcode_setZmodule_qstate_return_rcode_getrZmodule_qstate_region_setZmodule_qstate_region_getrZmodule_qstate_curmod_setZmodule_qstate_curmod_getrZ!module_qstate_prefetch_leeway_setZ!module_qstate_prefetch_leeway_getrZmodule_qstate_env_setZmodule_qstate_env_getrZmodule_qstate_mesh_info_setZmodule_qstate_mesh_info_getrZ!module_qstate_no_cache_lookup_setZ!module_qstate_no_cache_lookup_getrZ module_qstate_no_cache_store_setZ module_qstate_no_cache_store_getrrZ_module_qstate__ext_state_getrJZ ext_staterZedns_opts_front_in_iterrZedns_opts_back_out_iterrZedns_opts_back_in_iterrZedns_opts_front_out_iterrrrrrrrrrGZdelete_module_qstaterMrNrrrrrs                            rc@s4eZdZddZddZddZddZd d Zd S) rcCs ||_dS)N)ru)r'rurrrrG7szExtState.__init__cs djfddtdtjDS)Nz, cs g|]}tjtjj|qSr)r strextstate_ext_state_getru).0a)r'rr 9sz$ExtState.__str__..r)r ranger MODULE_COUNT)r'r)r'r__str__8szExtState.__str__cCstj|j|S)N)rrru)r'rvrrrrw:szExtState.__getitem__cCstj|j||dS)N)rrru)r'rvr*rrrrz;szExtState.__setitem__cCstjS)N)rr )r'rrrrx<szExtState.__len__N)rr5r8rGr rwrzrxrrrrr6s rc@s4eZdZddZddZddZddZd d Zd S) rcCs||_d|_dS)N)_current_temp)r'rurrrrG?szEdnsOptsListIter.__init__cCs|S)Nr)r'rrr__iter__BszEdnsOptsListIter.__iter__cCs|jS)zPython 3 compatibility) _get_next)r'rrr__next__CszEdnsOptsListIter.__next__cCs|jS)zPython 2 compatibility)r)r'rrrrFszEdnsOptsListIter.nextcCs0t|js(|j|_t|j|_t|jStdS)N)edns_opt_list_is_emptyr r _p_p_edns_option_get_next_dereference_edns_option StopIteration)r'rrrrIs    zEdnsOptsListIter._get_nextN)rr5r8rGr rrrrrrrr>s rcCs tj||S)N)rr)rOr|rrrrRsrcCstj|||S)N)rr)rOr|rrrrrVsrcCs tj|S)N)rr)optrrrrZsrcCs tj|S)N)rr)rrrrr^srcCs tj|S)N)rr)rrrrrbsrcCs tj|S)N)rr)rOrrrrfsrcCs tj|S)N)rr)rOrrrrjsrcCs tj|S)N)rr)rOrrrrnsrcCs tj|S)N)rr)rOrrrrrsrc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZddZe jZddZd S) config_strlistcCst|t||S)N)r-r)r'r)r*rrrr<wszconfig_strlist.cCs t|t|S)N)r/r)r'r)rrrr<ysrstrc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_config_strlistrrFr2r3)r'rrrrrGs zconfig_strlist.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r.rHr6r1rZconfig_strlist_next_setZconfig_strlist_next_getr#rIrZconfig_strlist_str_setZconfig_strlist_str_getrrGZdelete_config_strlistrMrNrrrrrus     rc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZddZe jZd dZd S) config_str2listcCst|t||S)N)r-r)r'r)r*rrrr<szconfig_str2list.cCs t|t|S)N)r/r)r'r)rrrr<srrstr2c Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_config_str2listrrFr2r3)r'rrrrrGs zconfig_str2list.__init__cCsdS)Nr)r'rrrr<sN)rr5r8r!r%r.rHr6r1rZconfig_str2list_next_setZconfig_str2list_next_getr#rIrZconfig_str2list_str_setZconfig_str2list_str_getrZconfig_str2list_str2_setZconfig_str2list_str2_getrrGZdelete_config_str2listrMrNrrrrrs(      rc@s eZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ e j!ed <e j"ed <e rZe e j"e j!Z#e j$ed <e j%ed <e re e j%e j$Z&e j'ed <e j(ed <e re e j(e j'Z)e j*ed<e j+ed<e re e j+e j*Z,e j-ed<e j.ed<e re e j.e j-Z/e j0ed<e j1ed<e r"e e j1e j0Z2e j3ed<e j4ed<e rJe e j4e j3Z5e j6ed<e j7ed<e rre e j7e j6Z8e j9ed<e j:ed<e re e j:e j9Z;e je j?ed<e j@ed<e re e j@e j?ZAe jBed<e jCed<e re e jCe jBZDe jEed<e jFed<e r:e e jFe jEZGe jHed<e jIed<e rbe e jIe jHZJe jKed<e jLed<e re e jLe jKZMe jNed<e jOed<e re e jOe jNZPe jQed<e jRed<e re e jRe jQZSe jTed<e jUed<e re e jUe jTZVe jWed<e jXed<e r*e e jXe jWZYe jZed<e j[ed<e rRe e j[e jZZ\e j]ed<e j^ed<e rze e j^e j]Z_e j`ed <e jaed <e re e jae j`Zbe jced!<e jded!<e re e jde jcZee jfed"<e jged"<e re e jge jfZhe jied#<e jjed#<e re e jje jiZke jled$<e jmed$<e rBe e jme jlZne joed%<e jped%<e rje e jpe joZqe jred&<e jsed&<e re e jse jrZte jued'<e jved'<e re e jve juZwe jxed(<e jyed(<e re e jye jxZze j{ed)<e j|ed)<e r e e j|e j{Z}e j~ed*<e jed*<e r2e e je j~Ze jed+<e jed+<e rZe e je jZe jed,<e jed,<e re e je jZe jed-<e jed-<e re e je jZe jed.<e jed.<e re e je jZe jed/<e jed/<e re e je jZe jed0<e jed0<e r"e e je jZe jed1<e jed1<e rJe e je jZe jed2<e jed2<e rre e je jZe jed3<e jed3<e re e je jZe jed4<e jed4<e re e je jZe jed5<e jed5<e re e je jZe jed6<e jed6<e re e je jZe jed7<e jed7<e r:e e je jZe jed8<e jed8<e rbe e je jZe jed9<e jed9<e re e je jZe jed:<e jed:<e re e je jZe jed;<e jed;<e re e je jZe jed<<e jed<<e re e je jZe jed=<e jed=<e r*e e je jZe jed><e jed><e rRe e je jZe jed?<e jed?<e rze e je jZe jed@<e jed@<e re e je jZe jedA<e jedA<e re e je jÃZe jedB<e jedB<e re e je jƃZe jedC<e jedC<e re e je jɃZe jedD<e jedD<e rBe e je j̃Ze jedE<e jedE<e rje e je jσZe jedF<e jedF<e re e je j҃Ze jedG<e jedG<e re e je jՃZe jedH<e jedH<e re e je j؃Ze jedI<e jedI<e r e e je jۃZe jedJ<e jedJ<e r2e e je jރZe jedK<e jedK<e rZe e je jZe jedL<e jedL<e re e je jZe jedM<e jedM<e re e je jZe jedN<e jedN<e re e je jZe jedO<e jedO<e re e je jZe jedP<e jedP<e r"e e je jZe jedQ<e jedQ<e rJe e je jZe jedR<e jedR<e rre e je jZe jedS<e jedS<e re e je jZdTdUZe jZdVdZdWS)X config_filecCst|t||S)N)r-r)r'r)r*rrrr<szconfig_file.cCs t|t|S)N)r/r)r'r)rrrr<s verbosity stat_intervalstat_cumulative stat_extended num_threadsrdo_ip4do_ip6do_udpdo_tcpoutgoing_num_portsoutgoing_num_tcpincoming_num_tcpoutgoing_avail_portsmsg_buffer_sizemsg_cache_sizemsg_cache_slabsnum_queries_per_thread jostle_timerrset_cache_sizerrset_cache_slabshost_ttlinfra_cache_slabsinfra_cache_numhoststarget_fetch_policy if_automaticnum_ifsifs num_out_ifsout_ifs root_hintsstubsforwardsdonotqueryaddrsaclsdonotquery_localhostharden_short_bufsizeharden_large_queries harden_glueharden_dnssec_strippedharden_referral_pathuse_caps_bits_for_idprivate_addressprivate_domainunwanted_threshold chrootdirusername directorylogfilepidfile use_syslog hide_identity hide_versionidentityversion module_conftrust_anchor_file_listtrust_anchor_listtrusted_keys_file_listmax_ttlval_date_override bogus_ttlval_clean_additionalval_permissive_modeval_nsec3_key_iterationskey_cache_sizekey_cache_slabsneg_cache_size local_zoneslocal_zones_nodefault local_dataremote_control_enable control_ifs control_portserver_key_fileserver_cert_filecontrol_key_filecontrol_cert_file do_daemonize python_scriptc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_config_filerrFr2r3)r'rrrrrGs zconfig_file.__init__cCsdS)Nr)r'rrrr<sN(rr5r8r!r%r.rHr6r1rZconfig_file_verbosity_setZconfig_file_verbosity_getr#rIrZconfig_file_stat_interval_setZconfig_file_stat_interval_getrZconfig_file_stat_cumulative_setZconfig_file_stat_cumulative_getrZconfig_file_stat_extended_setZconfig_file_stat_extended_getrZconfig_file_num_threads_setZconfig_file_num_threads_getrZconfig_file_port_setZconfig_file_port_getrZconfig_file_do_ip4_setZconfig_file_do_ip4_getrZconfig_file_do_ip6_setZconfig_file_do_ip6_getr Zconfig_file_do_udp_setZconfig_file_do_udp_getr!Zconfig_file_do_tcp_setZconfig_file_do_tcp_getr"Z"config_file_outgoing_num_ports_setZ"config_file_outgoing_num_ports_getr#Z config_file_outgoing_num_tcp_setZ config_file_outgoing_num_tcp_getr$Z config_file_incoming_num_tcp_setZ config_file_incoming_num_tcp_getr%Z$config_file_outgoing_avail_ports_setZ$config_file_outgoing_avail_ports_getr&Zconfig_file_msg_buffer_size_setZconfig_file_msg_buffer_size_getr'Zconfig_file_msg_cache_size_setZconfig_file_msg_cache_size_getr(Zconfig_file_msg_cache_slabs_setZconfig_file_msg_cache_slabs_getr)Z&config_file_num_queries_per_thread_setZ&config_file_num_queries_per_thread_getr*Zconfig_file_jostle_time_setZconfig_file_jostle_time_getr+Z config_file_rrset_cache_size_setZ config_file_rrset_cache_size_getr,Z!config_file_rrset_cache_slabs_setZ!config_file_rrset_cache_slabs_getr-Zconfig_file_host_ttl_setZconfig_file_host_ttl_getr.Z!config_file_infra_cache_slabs_setZ!config_file_infra_cache_slabs_getr/Z$config_file_infra_cache_numhosts_setZ$config_file_infra_cache_numhosts_getr0Z#config_file_target_fetch_policy_setZ#config_file_target_fetch_policy_getr1Zconfig_file_if_automatic_setZconfig_file_if_automatic_getr2Zconfig_file_num_ifs_setZconfig_file_num_ifs_getr3Zconfig_file_ifs_setZconfig_file_ifs_getr4Zconfig_file_num_out_ifs_setZconfig_file_num_out_ifs_getr5Zconfig_file_out_ifs_setZconfig_file_out_ifs_getr6Zconfig_file_root_hints_setZconfig_file_root_hints_getr7Zconfig_file_stubs_setZconfig_file_stubs_getr8Zconfig_file_forwards_setZconfig_file_forwards_getr9Zconfig_file_donotqueryaddrs_setZconfig_file_donotqueryaddrs_getr:Zconfig_file_acls_setZconfig_file_acls_getr;Z$config_file_donotquery_localhost_setZ$config_file_donotquery_localhost_getr<Z$config_file_harden_short_bufsize_setZ$config_file_harden_short_bufsize_getr=Z$config_file_harden_large_queries_setZ$config_file_harden_large_queries_getr>Zconfig_file_harden_glue_setZconfig_file_harden_glue_getr?Z&config_file_harden_dnssec_stripped_setZ&config_file_harden_dnssec_stripped_getr@Z$config_file_harden_referral_path_setZ$config_file_harden_referral_path_getrAZ$config_file_use_caps_bits_for_id_setZ$config_file_use_caps_bits_for_id_getrBZconfig_file_private_address_setZconfig_file_private_address_getrCZconfig_file_private_domain_setZconfig_file_private_domain_getrDZ"config_file_unwanted_threshold_setZ"config_file_unwanted_threshold_getrEZconfig_file_chrootdir_setZconfig_file_chrootdir_getrFZconfig_file_username_setZconfig_file_username_getrGZconfig_file_directory_setZconfig_file_directory_getrHZconfig_file_logfile_setZconfig_file_logfile_getrIZconfig_file_pidfile_setZconfig_file_pidfile_getrJZconfig_file_use_syslog_setZconfig_file_use_syslog_getrKZconfig_file_hide_identity_setZconfig_file_hide_identity_getrLZconfig_file_hide_version_setZconfig_file_hide_version_getrMZconfig_file_identity_setZconfig_file_identity_getrNZconfig_file_version_setZconfig_file_version_getrOZconfig_file_module_conf_setZconfig_file_module_conf_getrPZ&config_file_trust_anchor_file_list_setZ&config_file_trust_anchor_file_list_getrQZ!config_file_trust_anchor_list_setZ!config_file_trust_anchor_list_getrRZ&config_file_trusted_keys_file_list_setZ&config_file_trusted_keys_file_list_getrSZconfig_file_max_ttl_setZconfig_file_max_ttl_getrTZ!config_file_val_date_override_setZ!config_file_val_date_override_getrUZconfig_file_bogus_ttl_setZconfig_file_bogus_ttl_getrVZ$config_file_val_clean_additional_setZ$config_file_val_clean_additional_getrWZ#config_file_val_permissive_mode_setZ#config_file_val_permissive_mode_getrXZ(config_file_val_nsec3_key_iterations_setZ(config_file_val_nsec3_key_iterations_getrYZconfig_file_key_cache_size_setZconfig_file_key_cache_size_getrZZconfig_file_key_cache_slabs_setZconfig_file_key_cache_slabs_getr[Zconfig_file_neg_cache_size_setZconfig_file_neg_cache_size_getr\Zconfig_file_local_zones_setZconfig_file_local_zones_getr]Z%config_file_local_zones_nodefault_setZ%config_file_local_zones_nodefault_getr^Zconfig_file_local_data_setZconfig_file_local_data_getr_Z%config_file_remote_control_enable_setZ%config_file_remote_control_enable_getr`Zconfig_file_control_ifs_setZconfig_file_control_ifs_getraZconfig_file_control_port_setZconfig_file_control_port_getrbZconfig_file_server_key_file_setZconfig_file_server_key_file_getrcZ config_file_server_cert_file_setZ config_file_server_cert_file_getrdZ config_file_control_key_file_setZ config_file_control_key_file_getreZ!config_file_control_cert_file_setZ!config_file_control_cert_file_getrfZconfig_file_do_daemonize_setZconfig_file_do_daemonize_getrgZconfig_file_python_script_setZconfig_file_python_script_getrhrGZdelete_config_filerMrNrrrrrs                                                                                                                                                                rc@speZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ e!e j"Z#e!e j$Z%d d Z&e!e&Z'd dZ(e j)Z*ddZ+dS) delegpt_nscCst|t||S)N)r-ri)r'r)r*rrrr<szdelegpt_ns.cCs t|t|S)N)r/ri)r'r)rrrr<srresolvedgot4got6lame done_pside4 done_pside6cCs t|jS)N)rCrP)r'rrrrW&szdelegpt_ns._get_dname_strc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_delegpt_nsrrFr2r3)r'rrrrrG*s zdelegpt_ns.__init__cCsdS)Nr)r'rrrr<1sN),rr5r8r!r%r.rHr6r1rZdelegpt_ns_next_setZdelegpt_ns_next_getr#rIrZdelegpt_ns_resolved_setZdelegpt_ns_resolved_getrjZdelegpt_ns_got4_setZdelegpt_ns_got4_getrkZdelegpt_ns_got6_setZdelegpt_ns_got6_getrlZdelegpt_ns_lame_setZdelegpt_ns_lame_getrmZdelegpt_ns_done_pside4_setZdelegpt_ns_done_pside4_getrnZdelegpt_ns_done_pside6_setZdelegpt_ns_done_pside6_getrorJ_get_dpns_dnamerP_get_dpns_dname_componentsrZrWr[rGZdelete_delegpt_nsrMrNrrrrrisP                ric@s\eZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ d d Z!e"e!Z#d dZ$e j%Z&ddZ'dS) delegpt_addrcCst|t||S)N)r-rr)r'r)r*rrrr<7szdelegpt_addr.cCs t|t|S)N)r/rr)r'r)rrrr<9s next_result next_usable next_targetattemptssel_rttbogusrmcCst|S)N)_delegpt_addr_addr_get)r'rrrrXszdelegpt_addr._addr_getc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZnew_delegpt_addrrrFr2r3)r'rrrrrG\s zdelegpt_addr.__init__cCsdS)Nr)r'rrrr<csN)(rr5r8r!r%r.rHr6r1rZdelegpt_addr_next_result_setZdelegpt_addr_next_result_getr#rIrsZdelegpt_addr_next_usable_setZdelegpt_addr_next_usable_getrtZdelegpt_addr_next_target_setZdelegpt_addr_next_target_getruZdelegpt_addr_attempts_setZdelegpt_addr_attempts_getrvZdelegpt_addr_sel_rtt_setZdelegpt_addr_sel_rtt_getrwZdelegpt_addr_bogus_setZdelegpt_addr_bogus_getrxZdelegpt_addr_lame_setZdelegpt_addr_lame_getrmrrJrrGZdelete_delegpt_addrrMrNrrrrrr5sL              rrc@seZdZiZddZiZddZeZe j ed<e j ed<e rJe e j e j Ze jed<e jed<e rpe e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed<e jed<e re e je jZe jed <e jed <e r e e je jZe jed <e jed <e r2e e je jZ e j!ed <e j"ed <e rZe e j"e j!Z#e$e j%Z&e$e j'Z(d d Z)e$e)Z*ddZ+e j,Z-ddZ.dS)delegptcCst|t||S)N)r-rz)r'r)r*rrrr<iszdelegpt.cCs t|t|S)N)r/rz)r'r)rrrr<ksnamelabsnslist target_list usable_list result_listrxhas_parent_side_NS dp_type_mlccCs t|jS)N)rCrP)r'rrrrWszdelegpt._get_dname_strc Cs:tj}y|jj|Wntjk r4||_YnXdS)N)rZ new_delegptrrFr2r3)r'rrrrrGs zdelegpt.__init__cCsdS)Nr)r'rrrr<sN)/rr5r8r!r%r.rHr6r1rZdelegpt_namelabs_setZdelegpt_namelabs_getr#rIr{Zdelegpt_nslist_setZdelegpt_nslist_getr|Zdelegpt_target_list_setZdelegpt_target_list_getr}Zdelegpt_usable_list_setZdelegpt_usable_list_getr~Zdelegpt_result_list_setZdelegpt_result_list_getrZdelegpt_bogus_setZdelegpt_bogus_getrxZdelegpt_has_parent_side_NS_setZdelegpt_has_parent_side_NS_getrZdelegpt_dp_type_mlc_setZdelegpt_dp_type_mlc_getrrJ _get_dp_dnamerP_get_dp_dname_componentsrZrWr[rGZdelete_delegptrMrNrrrrrzgsX                  rzcCs tj|S)N)rr)dprrrrsrcCs tj|S)N)rr)rrrrrsrcCs tj|S)N)rrp)dpnsrrrrpsrpcCs tj|S)N)rrq)rrrrrqsrqcCs tj|S)N)rry)targetrrrrysryc Cstj|||||||||| S)N)rset_return_msg) qstaterr_namerr_typerr_classrR default_ttlquestionanswer authority additionalrrrrsrc@s$eZdZeddfddZddZdS) DNSMessagercCs:||_||_||_||_||_g|_g|_g|_g|_dS)z0Query flags is a combination of PKT_xx constantsN) rrrrrrrrr)r'rrrrrrrrrGszDNSMessage.__init__c CsJtj||j|j|j|j|j|j|j|j |j }|rFt |j@rFd|j j _|S)zReturns 1 if OKr)rrrrrrrrrrrPKT_AArrr)r'rZstatusrrrrs  zDNSMessage.set_return_msgN)rr5r8 RR_CLASS_INrGrrrrrrs rc Cstj|||||||||| | S)N)rdns_cache_find_delegation) rrDZqnamelenr=r>rmsgZtimenowZnoexpiredaboveZ expiretopZ expiretoplenrrrrsrcCstj|||||S)N)riter_dp_is_useless)rZqflagsrZ supports_ipv4Z supports_ipv6rrrrsrcCstj||||S)N)rhints_lookup_stub)rrDr>rrrrrsrcCstj|||S)N)rfind_delegation)rZnmZnmlenrrrrsrcCs tj||S)N)runbound_verbose)levelformatrrrr srcCs tj|S)N)runbound_log_info)rrrrrsrcCs tj|S)N)runbound_log_err)rrrrrsrcCs tj|S)N)runbound_log_warn)rrrrrsrcCstj|||S)N)rlog_hex)rrhZlengthrrrrsrcCstj|||S)N)r log_dns_msg)rrrrrrrsrcCstj|||S)N)rlog_query_info)vrZqinfrrrr"srcCs tj|S)N)rregional_log_stats)rrrrr&srcCs tj|S)N)rlog_info)rrrrr*srcCs tj|S)N)rlog_err)rrrrr.srcCs tj|S)N)rlog_warn)rrrrr2srcCs tj||S)N)rverbose)rrrrrr6srcCs tj|S)N)rr?)Zatyperrrr?:sr?cCs tj|S)N)rrA)ZaclassrrrrA>srAcCstj||||S)N)rstoreQueryInCache)rrZmsgrepZ is_referralrrrrBsrcCs tj||S)N)rinvalidateQueryInCache)rrrrrrFsrcCs tj|S)N)rr)srrrrJsrcCs tj|S)N)r strmodulevent)errrrNsrcCs tj||S)N)redns_opt_list_find)listrrrrrRsrcCstj||||S)N)redns_register_option)Zopt_codebypass_cache_stageno_aggregationrrrrrVsrFcCst||||S)z/Wrapper function to provide keyword attributes.)r)rrrrrrrregister_edns_optionZsrcCs tj||S)N)redns_opt_list_remove)rrrrrrasrcCstj||||S)N)redns_opt_list_append)rrr:rrrrresrcCstj|||||S)N)rinplace_cb_register)cbrZcbargrr_rrrrisrcCstj|||S)N)rregister_inplace_cb_reply)py_cbrr_rrrrmsrcCstj|||S)N)rregister_inplace_cb_reply_cache)rrr_rrrrqsrcCstj|||S)N)rregister_inplace_cb_reply_local)rrr_rrrrusrcCstj|||S)N)r"register_inplace_cb_reply_servfail)rrr_rrrrysrcCstj|||S)N)rregister_inplace_cb_query)rrr_rrrr}sr)rrr)rrr)r)FF( sysrZ_swig_python_version_inforrrJrI NameErrorbuiltinsr2r r,r-r/r6r$r7r#r3r9r;Zquery_info_swigregisterrZ RR_CLASS_CHZ RR_CLASS_HSZ RR_CLASS_NONEZ RR_CLASS_ANYZ RR_TYPE_AZ RR_TYPE_NSZ RR_TYPE_MDZ RR_TYPE_MFZ RR_TYPE_CNAMEZ RR_TYPE_SOAZ RR_TYPE_MBZ RR_TYPE_MGZ RR_TYPE_MRZ RR_TYPE_NULLZ RR_TYPE_WKSZ RR_TYPE_PTRZ RR_TYPE_HINFOZ RR_TYPE_MINFOZ RR_TYPE_MXZ RR_TYPE_TXTZ RR_TYPE_RPZ RR_TYPE_AFSDBZ RR_TYPE_X25Z RR_TYPE_ISDNZ RR_TYPE_RTZ RR_TYPE_NSAPZRR_TYPE_NSAP_PTRZ RR_TYPE_SIGZ RR_TYPE_KEYZ RR_TYPE_PXZ RR_TYPE_GPOSZ RR_TYPE_AAAAZ RR_TYPE_LOCZ RR_TYPE_NXTZ RR_TYPE_EIDZRR_TYPE_NIMLOCZ RR_TYPE_SRVZ RR_TYPE_ATMAZ RR_TYPE_NAPTRZ RR_TYPE_KXZ RR_TYPE_CERTZ RR_TYPE_A6Z RR_TYPE_DNAMEZ RR_TYPE_SINKZ RR_TYPE_OPTZ RR_TYPE_APLZ RR_TYPE_DSZ RR_TYPE_SSHFPZRR_TYPE_IPSECKEYZ RR_TYPE_RRSIGZ RR_TYPE_NSECZRR_TYPE_DNSKEYZ RR_TYPE_DHCIDZ RR_TYPE_NSEC3ZRR_TYPE_NSEC3PARAMSZ RR_TYPE_UINFOZ RR_TYPE_UIDZ RR_TYPE_GIDZRR_TYPE_UNSPECZ RR_TYPE_TSIGZ RR_TYPE_IXFRZ RR_TYPE_AXFRZ RR_TYPE_MAILBZ RR_TYPE_MAILAZ RR_TYPE_ANYZ RR_TYPE_DLVrKrLrCrQZpacked_rrset_key_swigregisterrTrXrYr]Z ub_packed_rrset_key_swigregisterraZlruhash_entry_swigregisterriZpacked_rrset_data_swigregisterrorqrsrpryrrrtr}Zreply_info_swigregisterrZrrset_ref_swigregisterrZdns_msg_swigregisterrrrrrZsockaddr_storage_swigregisterrrrrrrrrZmesh_state_swigregisterrZmesh_reply_swigregisterrZcomm_reply_swigregisterrZedns_option_swigregisterrrrZedns_data_swigregisterrrZmodule_env_swigregisterrrZmodule_qstate_swigregisterr Z QF_BIT_CDZ QF_BIT_ADZQF_BIT_ZZ QF_BIT_RAZ QF_BIT_RDZ QF_BIT_TCZ QF_BIT_AAZ QF_BIT_QRZ RCODE_NOERRORZ RCODE_FORMERRZRCODE_SERVFAILZRCODE_NXDOMAINZ RCODE_NOTIMPLZ RCODE_REFUSEDZRCODE_YXDOMAINZ RCODE_YXRRSETZ RCODE_NXRRSETZ RCODE_NOTAUTHZ RCODE_NOTZONErrrrrrrrrrrrZconfig_strlist_swigregisterrZconfig_str2list_swigregisterrZconfig_file_swigregisterriZdelegpt_ns_swigregisterrrZdelegpt_addr_swigregisterrzZdelegpt_swigregisterrrrprqryZMODULE_STATE_INITIALZMODULE_WAIT_REPLYZMODULE_WAIT_MODULEZMODULE_RESTART_NEXTZMODULE_WAIT_SUBQUERYZ MODULE_ERRORZMODULE_FINISHEDZMODULE_EVENT_NEWZMODULE_EVENT_PASSZMODULE_EVENT_REPLYZMODULE_EVENT_NOREPLYZMODULE_EVENT_CAPSFAILZMODULE_EVENT_MODDONEZMODULE_EVENT_ERRORZsec_status_uncheckedZsec_status_bogusZsec_status_indeterminateZsec_status_insecureZsec_status_secureZ NO_VERBOSEZVERB_OPSZ VERB_DETAILZ VERB_QUERYZ VERB_ALGOZinplace_cb_replyZinplace_cb_reply_cacheZinplace_cb_reply_localZinplace_cb_reply_servfailZinplace_cb_queryZinplace_cb_edns_back_parsedZinplace_cb_types_totalZPKT_QRrZPKT_TCZPKT_RDZPKT_CDZPKT_RAZPKT_ADrrrrrrrrrrrrrrrrrrr?rArrrrrrrrrrrrrrrrrrrs     #&++>"&9aQ3/7