Hacked By AnonymousFox

Current Path : /lib64/python3.6/site-packages/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/__pycache__/unbound.cpython-36.pyc

3

v5f�$@s�ddlmZedskr&dd�Ze�Z[n"edtkr@dd�Ze�Z[nddlZ[yeZWnek
rfYnXyddlZ	Wne
k
r�ddl	Z	YnXdud
d�Zdd
�Zdd�Z
dd�ZyeZd	ZWn(e	jk
r�Gdd�d�ZdZYnXddlZyddlZWne
k
�rddl	ZYnXde�k�r.eZdd�Zdd�ZejZejZejZejZejZejZejZej 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;ej<Z<ej=Z=ej>Z>ej?Z?ej@Z@ejAZAejBZBejCZCejDZDejEZEejFZFejGZGejHZHejIZIejJZJejKZKejLZLejMZMejNZNejOZOejPZPejQZQejRZRejSZSejTZTejUZUejVZVejWZWejXZXejYZYejZZZej[Z[ej\Z\ej]Z]dd�Z^ej^Z^ej_Z_ej`Z`ejaZaejbZbejcZcejdZdejeZeejfZfejgZgejhZhejiZiGdd�d�ZjejkZkejlZlejmZmejnZnejoZoejpZpGdd�de�ZqejrZrereq�ejsZsejtZtejuZuejvZvejwZwejxZxejyZyejzZzej{Z{ej|Z|ej}Z}dd �Z~ej~Z~d!d"�ZejZd#d$�Z�ej�Z�d%d&�Z�ej�Z�d'd(�Z�ej�Z�d)d*�Z�ej�Z�d+d,�Z�ej�Z�d-d.�Z�ej�Z�d/d0�Z�ej�Z�d1d2�Z�ej�Z�d3d4�Z�ej�Z�d5d6�Z�ej�Z�d7d8�Z�ej�Z�d9d:�Z�ej�Z�d;d<�Z�ej�Z�d=d>�Z�ej�Z�d?d@�Z�ej�Z�dAdB�Z�ej�Z�dCdD�Z�ej�Z�dEdF�Z�ej�Z�dGdH�Z�ej�Z�dIdJ�Z�ej�Z�dKdL�Z�ej�Z�dMdN�Z�ej�Z�dOdP�Z�ej�Z�dQdR�Z�ej�Z�dSdT�Z�ej�Z�dUdV�Z�ej�Z�dWdX�Z�ej�Z�dYdZ�Z�ej�Z�d[d\�Z�ej�Z�Gd]d^�d^e�Z�ej�Z�e�e��Gd_d`�d`e�Z�ej�Z�e�e��Gdadb�dbe�Z�ej�Z�e�e��ej�Z�ej�Z�ej�Z�ej�Z�ej�Z�ej�Z�Gdcdd�dde�Z�ej�Z�e�e��Gdedf�dfe�Z�ej�Z�e�e��Gdgdh�dhe�Z�ej�Z�e�e��didj�Z�ej�Z�dkdl�Z�ej�Z�ej�Z�dmdn�Z�dodp�Z�dqdr�Z�dS)v�)�version_info��cCsTddl}tjd�d}dj|df�jd�}y
|j|�Stk
rN|jd�SXdS)Nr�.�_unbound)�	importlib�__name__�
rpartition�join�lstrip�
import_module�ImportError)rZpkgZmname�r�/usr/lib64/python3.6/unbound.py�swig_import_helper	s
r�cCs~ddlm}ddl}d}y|jd|t�g�\}}}Wntk
rPddl}|SXz|jd|||�}Wd|dk	rx|j�X|S)Nr)�dirnamer)	Zos.pathr�imp�find_module�__file__r
r�load_module�close)rr�fp�pathname�descriptionrZ_modrrrrs
N�cCs�|dkr|jj|�S|dkr8t|�jdkr8||j|<dS|jj|d�}|rT|||�S|sxtrltj	|||�q�||j|<nt
d|��dS)N�thisown�thisZSwigPyObjectzYou cannot add attributes to %s)r�own�typer�__dict__�__swig_setmethods__�get�	_newclass�object�__setattr__�AttributeError)�self�
class_type�name�valueZstatic�methodrrr�_swig_setattr_nondynamic3s

r,cCst||||d�S)Nr)r,)r'r(r)r*rrr�
_swig_setattrFsr-cCsB|dkr|jj�S|jj|d�}|r,||�Std|j|f��dS)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^sr7�bytescCst|t�r|Stj|�S)N)�
isinstance�int�builtins�ord)�srrrr=ms
r=cCs
tj|�S)N)r�ub_ctx_free_dbg)�crrrr?ssr?cCs
tj|�S)N)r�ub_resolve_free_dbg)�rrrrrA�srAc@s�eZdZdZdd�Zdd�Zeddd��Zd	d
�Ze	edd�Z
d
d�Ze	edd�Zdd�Z
e	e
dd�Zdd�Ze	edd�Zdd�Ze	edd�Zdd�Ze	edd�ZdS)�ub_dataz3Class which makes the resolution results accessiblecCs|dkrtd��||_dS)zZCreates ub_data class
         :param data: a list of the result data in RAW format
      Nzub_data init: No data)r3�data)r'rDrrr�__init__�szub_data.__init__cCsdjdd�|jD��S)zRepresents data as string�;cSs g|]}djtdd�|���qS)� cSsdt|�S)Nz%02X)r=)�xrrr�<lambda>�sz,ub_data.__str__.<locals>.<listcomp>.<lambda>)r
�map)�.0�arrr�
<listcomp>�sz#ub_data.__str__.<locals>.<listcomp>)r
rD)r'rrr�__str__�szub_data.__str__rcCsz|sgSg}t|�}|dkr&t||�}|}xJ||krtt||�}|jt||d|d|�j���||d7}q,W|S)z�Parses DNAME and produces a list of labels

         :param ofs: where the conversion should start to parse data
         :param maxlen: maximum length (0 means parse to the end)
         :returns: list of labels (string)
      rr)�len�minr=�append�str�decode)r>Zofs�maxlen�resZslen�idxZcomplenrrr�	dname2str�s

&zub_data.dname2strcCs|jS)zReturns a list of RAW strings)rD)r'rrr�as_raw_data�szub_data.as_raw_datazLReturns RAW data (a list of binary encoded strings). See :meth:`as_raw_data`)�doccs�fdd��jD�S)zzRepresents data as a list of MX records (query for RR_TYPE_MX)

         :returns: list of tuples (priority, dname)
      csDg|]<}dt|d�t|d�djdd��j|d�D��f�qS)�rrrcSsg|]}|�qSrr)rKrLrrrrM�sz1ub_data.as_mx_list.<locals>.<listcomp>.<listcomp>r)r=r
rW)rK�rdf)r'rrrM�sz&ub_data.as_mx_list.<locals>.<listcomp>)rD)r'r)r'r�
as_mx_list�szub_data.as_mx_listzUReturns a list of tuples containing priority and domain names. See :meth:`as_mx_list`cs�fdd��jD�S)z�Represents data as a list of MX records (query for RR_TYPE_MX)

         :returns: list of tuples (priority, unicode dname)
      csDg|]<}dt|d�t|d�djdd��j|d�D��f�qS)rZrrrcSsg|]}tjj|��qSr)�	encodings�idna�	ToUnicode)rKrLrrrrMsz5ub_data.as_idn_mx_list.<locals>.<listcomp>.<listcomp>r)r=r
rW)rKr[)r'rrrMsz*ub_data.as_idn_mx_list.<locals>.<listcomp>)rD)r'r)r'r�as_idn_mx_listszub_data.as_idn_mx_listz]Returns a list of tuples containing priority and IDN domain names. See :meth:`as_idn_mx_list`cCsdd�|jD�S)zlRepresents data as a list of IP addresses (query for RR_TYPE_PTR)

         :returns: list of strings
      cSs g|]}djtdd�|���qS)rcSstt|��S)N)rRr=)rHrrrrIsz4ub_data.as_address_list.<locals>.<listcomp>.<lambda>)r
rJ)rKrLrrrrMsz+ub_data.as_address_list.<locals>.<listcomp>)rD)r'rrr�as_address_list	szub_data.as_address_listz;Returns a list of IP addresses. See :meth:`as_address_list`cst�fdd��j�S)zjRepresents data as a list of domain names (query for RR_TYPE_A)

         :returns: list of strings
      csdj�j|��S)Nr)r
rW)rH)r'rrrIsz(ub_data.as_domain_list.<locals>.<lambda>)rJrD)r'r)r'r�as_domain_listszub_data.as_domain_listz:Returns a list of domain names. See :meth:`as_domain_list`cst�fdd��j�S)zrRepresents data as a list of unicode domain names (query for RR_TYPE_A)

         :returns: list of strings
      csdjdd��j|�D��S)NrcSsg|]}tjj|��qSr)r]r^r_)rKrLrrrrM sz@ub_data.as_idn_domain_list.<locals>.<lambda>.<locals>.<listcomp>)r
rW)rH)r'rrrI sz,ub_data.as_idn_domain_list.<locals>.<lambda>)rJrD)r'r)r'r�as_idn_domain_listszub_data.as_idn_domain_listzBReturns a list of IDN domain names. See :meth:`as_idn_domain_list`N)rr)rr5r8�__doc__rErN�staticmethodrWrX�property�rawr\Zmx_listr`Zmx_list_idnraZaddress_listrbZdomain_listrcZdomain_list_idnrrrrrC�s"rCc@s8eZdZdZiZdd�ZiZdd�Zdd�Ze	Z
ejed<ej
ed<erVeej
ej�Zejed<ejed<er|eejej�Zejed	<ejed	<er�eejej�Zejed
<ejed
<er�eejej�Zejed<ejed<er�eejej�Zejed<ejed<e�reejej�Zej ed
<ej!ed
<e�r>eej!ej �Z"ej#ed<ej$ed<e�rfeej$ej#�Z%ej&ed<ej'ed<e�r�eej'ej&�Z(ej)ed<ej*ed<e�r�eej*ej)�Z+ej,ed<ej-ed<e�r�eej-ej,�Z.ej/ed<ej0ed<e�reej0ej/�Z1ej2ed<ej3ed<e�r.eej3ej2�Z4ej5ed<ej6ed<e�rVeej6ej5�Z7ej8ed<ej9ed<e�r~eej9ej8�Z:ej;ed<ej<ed<e�r�eej<ej;�Z=dd�Z>dd�Z?dd�Zej@ZAeBdeCdeDdeEdeFd eGd!eHd"eId#eJd$eKd%eLd&iZMd'd(�ZNeOeN�ZPd)d*�ZQeOeQd+d,�ZRd-d.�ZSeOe?�ZTeOeSd/d,�ZUd0S)1�	ub_resultz&The validation and resolution results.cCst|t||�S)N)r-rh)r'r)r*rrrrI.szub_result.<lambda>cCst|t|�S)N)r/rh)r'r)rrrrI0scOstd��dS)NzNo constructor defined)r&)r'�args�kwargsrrrrE2szub_result.__init__�qname�qtype�qclass�_datarO�	canonname�rcode�
answer_packet�
answer_len�havedata�nxdomain�secure�bogus�	why_bogus�ttl�was_ratelimitedcCstj||�S)N)rZub_result__ub_result_data)r'�resultrrr�_ub_result_datavszub_result._ub_result_datacCs
tj|�S)N)rZub_result__packet)r'rrr�_packetyszub_result._packetcCstd��dS)Nz%This class can't be created directly.)r3)r'rrrrE|szno errorz
form errorz	serv failz	nx domainznot implementedZrefusedZyxdomainZyxrrsetZnxrrsetznot authznot zonecCs|j|jS)zRReturns rcode in display representation form

           :returns: string
        )�	rcode2strrp)r'rrr�_get_rcode_str�szub_result._get_rcode_strcCs
|j|�S)aResult data, a list of network order DNS rdata items. 

           Data are represented as a list of strings. To decode RAW data to the list of IP addresses use :attr:`data` attribute which returns an :class:`ub_data` instance containing conversion function.
        )r{)r'rrr�
_get_raw_data�szub_result._get_raw_dataz�Returns raw data, a list of rdata items. To decode RAW data use the :attr:`data` attribute which returns an instance of :class:`ub_data` containing the conversion functions.)rYcCs|js
dSt|j|��S)N)rsrCr{)r'rrr�	_get_data�szub_result._get_datazOReturns :class:`ub_data` instance containing various decoding functions or NoneN)Vrr5r8rdr!r%r.�__getattr__rEr6r1rZub_result_qname_setZub_result_qname_getr#�_swig_propertyrkZub_result_qtype_setZub_result_qtype_getrlZub_result_qclass_setZub_result_qclass_getrmZub_result__data_setZub_result__data_getrnZub_result_len_setZub_result_len_getrOZub_result_canonname_setZub_result_canonname_getroZub_result_rcode_setZub_result_rcode_getrpZub_result_answer_packet_setZub_result_answer_packet_getrqZub_result_answer_len_setZub_result_answer_len_getrrZub_result_havedata_setZub_result_havedata_getrsZub_result_nxdomain_setZub_result_nxdomain_getrtZub_result_secure_setZub_result_secure_getruZub_result_bogus_setZub_result_bogus_getrvZub_result_why_bogus_setZub_result_why_bogus_getrwZub_result_ttl_setZub_result_ttl_getrxZub_result_was_ratelimited_setZub_result_was_ratelimited_getryr{r|�_ub_resolve_free�__swig_destroy__�
RCODE_NOERROR�
RCODE_FORMERR�RCODE_SERVFAIL�RCODE_NXDOMAIN�
RCODE_NOTIMPL�
RCODE_REFUSED�RCODE_YXDOMAIN�
RCODE_YXRRSET�
RCODE_NXRRSET�
RCODE_NOTAUTH�
RCODE_NOTZONEr}r~rfZ	rcode_strrZrawdatar�ZpacketrDrrrrrh*s�































0rhcCstj�S)N)r�
ub_ctx_createrrrrr��sr�cCs
tj|�S)N)r�_ub_ctx_delete)�ctxrrrr��sr�cCstj|||�S)N)r�ub_ctx_set_option)r��opt�valrrrr��sr�cCstj|||�S)N)r�ub_ctx_get_option)r�r�rRrrrr��sr�cCstj||�S)N)r�
ub_ctx_config)r��fnamerrrr��sr�cCstj||�S)N)r�ub_ctx_set_fwd)r��addrrrrr��sr�cCstj||�S)N)r�ub_ctx_set_tls)r�Ztlsrrrr��sr�cCstj||||�S)N)r�ub_ctx_set_stub)r�Zzoner�Zisprimerrrr��sr�cCstj||�S)N)r�ub_ctx_resolvconf)r�r�rrrr��sr�cCstj||�S)N)r�ub_ctx_hosts)r�r�rrrr��sr�cCstj||�S)N)r�
ub_ctx_add_ta)r��tarrrr��sr�cCstj||�S)N)r�ub_ctx_add_ta_file)r�r�rrrr��sr�cCstj||�S)N)r�ub_ctx_add_ta_autr)r�r�rrrr��sr�cCstj||�S)N)r�ub_ctx_trustedkeys)r�r�rrrr��sr�cCstj||�S)N)r�ub_ctx_debuglevel)r��drrrr��sr�cCstj||�S)N)r�ub_ctx_async)r��dothreadrrrr��sr�cCs
tj|�S)N)r�ub_poll)r�rrrr��sr�cCs
tj|�S)N)r�ub_wait)r�rrrr��sr�cCs
tj|�S)N)r�ub_fd)r�rrrr��sr�cCs
tj|�S)N)r�
ub_process)r�rrrr��sr�cCstj||||�S)N)r�
ub_resolve)r�r)�rrtype�rrclassrrrr��sr�cCstj|||||||�S)N)r�ub_resolve_async)r�r)r�r��mydata�callback�async_idrrrr�sr�cCstj||�S)N)r�	ub_cancel)r�r�rrrr�sr�cCs
tj|�S)N)rr�)rzrrrr�sr�cCs
tj|�S)N)r�ub_strerror)�errrrrr�sr�cCs
tj|�S)N)r�ub_ctx_print_local_zones)r�rrrr�sr�cCstj|||�S)N)r�ub_ctx_zone_add)r��	zone_nameZ	zone_typerrrr�sr�cCstj||�S)N)r�ub_ctx_zone_remove)r�r�rrrr�sr�cCstj||�S)N)r�ub_ctx_data_add)r�rDrrrr�sr�cCstj||�S)N)r�ub_ctx_data_remove)r�rDrrrr�#sr�cCstj�S)N)r�
ub_versionrrrrr�'sr�c@s�eZdZiZdd�ZiZdd�ZeZe	j
ed<e	jed<erJe
e	je	j
�Ze	jed<erbe
e	j�Ze	jed<erze
e	j�Zdd�Ze	jZd	d�Zd
S)�ub_shm_stat_infocCst|t||�S)N)r-r�)r'r)r*rrrrI,szub_shm_stat_info.<lambda>cCst|t|�S)N)r/r�)r'r)rrrrI.s�num_threads�time�memcCs:tj�}y|jj|�Wntjk
r4||_YnXdS)N)rZnew_ub_shm_stat_inforrQr2r3)r'rrrrrE;s
zub_shm_stat_info.__init__cCsdS)Nr)r'rrrrIBsN)rr5r8r!r%r.r�r6r1rZ ub_shm_stat_info_num_threads_setZ ub_shm_stat_info_num_threads_getr#r�r�Zub_shm_stat_info_time_getr�Zub_shm_stat_info_mem_getr�rEZdelete_ub_shm_stat_infor��__del__rrrrr�*s$





r�c@s�eZdZiZdd�ZiZdd�ZeZe	j
ed<e	jed<erJe
e	je	j
�Ze	jed<e	jed<erpe
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed	<e	jed	<e�r
e
e	je	j�Ze	jed
<e	jed
<e�r2e
e	je	j�Z e	j!ed<e	j"ed<e�rZe
e	j"e	j!�Z#e	j$ed<e	j%ed<e�r�e
e	j%e	j$�Z&e	j'ed
<e	j(ed
<e�r�e
e	j(e	j'�Z)dd�Z*e	j+Z,dd�Z-dS)�ub_shm_stat_info_memcCst|t||�S)N)r-r�)r'r)r*rrrrIHszub_shm_stat_info_mem.<lambda>cCst|t|�S)N)r/r�)r'r)rrrrIJs�msg�rrsetr��iter�subnet�ipsecmod�respip�dnscrypt_shared_secret�dnscrypt_nonce�dynlibcCs:tj�}y|jj|�Wntjk
r4||_YnXdS)N)rZnew_ub_shm_stat_info_memrrQr2r3)r'rrrrrEus
zub_shm_stat_info_mem.__init__cCsdS)Nr)r'rrrrI|sN).rr5r8r!r%r.r�r6r1rZub_shm_stat_info_mem_msg_setZub_shm_stat_info_mem_msg_getr#r�r�Zub_shm_stat_info_mem_rrset_setZub_shm_stat_info_mem_rrset_getr�Zub_shm_stat_info_mem_val_setZub_shm_stat_info_mem_val_getr�Zub_shm_stat_info_mem_iter_setZub_shm_stat_info_mem_iter_getr�Zub_shm_stat_info_mem_subnet_setZub_shm_stat_info_mem_subnet_getr�Z!ub_shm_stat_info_mem_ipsecmod_setZ!ub_shm_stat_info_mem_ipsecmod_getr�Zub_shm_stat_info_mem_respip_setZub_shm_stat_info_mem_respip_getr�Z/ub_shm_stat_info_mem_dnscrypt_shared_secret_setZ/ub_shm_stat_info_mem_dnscrypt_shared_secret_getr�Z'ub_shm_stat_info_mem_dnscrypt_nonce_setZ'ub_shm_stat_info_mem_dnscrypt_nonce_getr�Zub_shm_stat_info_mem_dynlib_setZub_shm_stat_info_mem_dynlib_getr�rEZdelete_ub_shm_stat_info_memr�r�rrrrr�Fs`



















r�c@s$eZdZiZdd�ZiZdd�ZeZe	j
ed<e	jed<erJe
e	je	j
�Ze	jed<e	jed<erpe
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed	<e	jed	<e�r
e
e	je	j�Zd
d�Ze	jZ dd�Z!d
S)�ub_shm_stat_info_timecCst|t||�S)N)r-r�)r'r)r*rrrrI�szub_shm_stat_info_time.<lambda>cCst|t|�S)N)r/r�)r'r)rrrrI�s�now_sec�now_usec�up_sec�up_usec�elapsed_sec�elapsed_useccCs:tj�}y|jj|�Wntjk
r4||_YnXdS)N)rZnew_ub_shm_stat_info_timerrQr2r3)r'rrrrrE�s
zub_shm_stat_info_time.__init__cCsdS)Nr)r'rrrrI�sN)"rr5r8r!r%r.r�r6r1rZ!ub_shm_stat_info_time_now_sec_setZ!ub_shm_stat_info_time_now_sec_getr#r�r�Z"ub_shm_stat_info_time_now_usec_setZ"ub_shm_stat_info_time_now_usec_getr�Z ub_shm_stat_info_time_up_sec_setZ ub_shm_stat_info_time_up_sec_getr�Z!ub_shm_stat_info_time_up_usec_setZ!ub_shm_stat_info_time_up_usec_getr�Z%ub_shm_stat_info_time_elapsed_sec_setZ%ub_shm_stat_info_time_elapsed_sec_getr�Z&ub_shm_stat_info_time_elapsed_usec_setZ&ub_shm_stat_info_time_elapsed_usec_getr�rEZdelete_ub_shm_stat_info_timer�r�rrrrr��s@











r�c@s�	eZdZiZdd�ZiZdd�ZeZe	j
ed<e	jed<erJe
e	je	j
�Ze	jed<e	jed<erpe
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed	<e	jed	<e�r
e
e	je	j�Ze	jed
<e	jed
<e�r2e
e	je	j�Z e	j!ed<e	j"ed<e�rZe
e	j"e	j!�Z#e	j$ed<e	j%ed<e�r�e
e	j%e	j$�Z&e	j'ed
<e	j(ed
<e�r�e
e	j(e	j'�Z)e	j*ed<e	j+ed<e�r�e
e	j+e	j*�Z,e	j-ed<e	j.ed<e�r�e
e	j.e	j-�Z/e	j0ed<e	j1ed<e�r"e
e	j1e	j0�Z2e	j3ed<e	j4ed<e�rJe
e	j4e	j3�Z5e	j6ed<e	j7ed<e�rre
e	j7e	j6�Z8e	j9ed<e	j:ed<e�r�e
e	j:e	j9�Z;e	j<ed<e	j=ed<e�r�e
e	j=e	j<�Z>e	j?ed<e	j@ed<e�r�e
e	j@e	j?�ZAe	jBed<e	jCed<e�re
e	jCe	jB�ZDe	jEed<e	jFed<e�r:e
e	jFe	jE�ZGe	jHed<e	jIed<e�rbe
e	jIe	jH�ZJe	jKed<e	jLed<e�r�e
e	jLe	jK�ZMe	jNed<e	jOed<e�r�e
e	jOe	jN�ZPe	jQed<e	jRed<e�r�e
e	jRe	jQ�ZSe	jTed<e	jUed<e�re
e	jUe	jT�ZVe	jWed<e	jXed<e�r*e
e	jXe	jW�ZYe	jZed<e	j[ed<e�rRe
e	j[e	jZ�Z\e	j]ed<e	j^ed<e�rze
e	j^e	j]�Z_e	j`ed <e	jaed <e�r�e
e	jae	j`�Zbe	jced!<e	jded!<e�r�e
e	jde	jc�Zee	jfed"<e	jged"<e�r�e
e	jge	jf�Zhe	jied#<e	jjed#<e�re
e	jje	ji�Zke	jled$<e	jmed$<e�rBe
e	jme	jl�Zne	joed%<e	jped%<e�rje
e	jpe	jo�Zqe	jred&<e	jsed&<e�r�e
e	jse	jr�Zte	jued'<e	jved'<e�r�e
e	jve	ju�Zwe	jxed(<e	jyed(<e�r�e
e	jye	jx�Zze	j{ed)<e	j|ed)<e�r
e
e	j|e	j{�Z}e	j~ed*<e	jed*<e�r2e
e	je	j~�Z�e	j�ed+<e	j�ed+<e�rZe
e	j�e	j��Z�e	j�ed,<e	j�ed,<e�r�e
e	j�e	j��Z�e	j�ed-<e	j�ed-<e�r�e
e	j�e	j��Z�e	j�ed.<e	j�ed.<e�r�e
e	j�e	j��Z�e	j�ed/<e	j�ed/<e�r�e
e	j�e	j��Z�e	j�ed0<e	j�ed0<e�r"e
e	j�e	j��Z�e	j�ed1<e	j�ed1<e�rJe
e	j�e	j��Z�e	j�ed2<e	j�ed2<e�rre
e	j�e	j��Z�e	j�ed3<e	j�ed3<e�r�e
e	j�e	j��Z�e	j�ed4<e	j�ed4<e�r�e
e	j�e	j��Z�e	j�ed5<e	j�ed5<e�r�e
e	j�e	j��Z�e	j�ed6<e	j�ed6<e�re
e	j�e	j��Z�e	j�ed7<e	j�ed7<e�r:e
e	j�e	j��Z�e	j�ed8<e	j�ed8<e�rbe
e	j�e	j��Z�e	j�ed9<e	j�ed9<e�r�e
e	j�e	j��Z�e	j�ed:<e	j�ed:<e�r�e
e	j�e	j��Z�e	j�ed;<e	j�ed;<e�r�e
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�	r*e
e	j�e	j��Z�e	j�ed><e	j�ed><e�	rRe
e	j�e	j��Z�e	j�ed?<e	j�ed?<e�	rze
e	j�e	j��Z�e	j�ed@<e	j�ed@<e�	r�e
e	j�e	j��Z�e	j�edA<e	j�edA<e�	r�e
e	j�e	jÃZ�dBdC�Z�e	j�Z�dDd�Z�dES)F�ub_server_statscCst|t||�S)N)r-r�)r'r)r*rrrrI�szub_server_stats.<lambda>cCst|t|�S)N)r/r�)r'r)rrrrI�s�num_queries�num_queries_ip_ratelimited�num_queries_missed_cache�num_queries_prefetch�sum_query_list_size�max_query_list_size�extendedrl�	qtype_bigrm�
qclass_big�qopcode�qtcp�
qtcp_outgoing�
qudp_outgoing�qtls�qhttps�qipv6�qbit_QR�qbit_AA�qbit_TC�qbit_RD�qbit_RA�qbit_Z�qbit_AD�qbit_CD�qEDNS�qEDNS_DO�	ans_rcode�ans_rcode_nodata�
ans_secure�	ans_bogus�rrset_bogus�queries_ratelimited�unwanted_replies�unwanted_queries�tcp_accept_usage�ans_expired�hist�msg_cache_count�rrset_cache_count�infra_cache_count�key_cache_count�num_query_dnscrypt_crypted�num_query_dnscrypt_cert�num_query_dnscrypt_cleartext�$num_query_dnscrypt_crypted_malformed�&num_query_dnscrypt_secret_missed_cache�shared_secret_cache_count�num_query_dnscrypt_replay�nonce_cache_count�num_query_authzone_up�num_query_authzone_down�num_neg_cache_noerror�num_neg_cache_nxdomain�num_query_subnet�num_query_subnet_cache�mem_stream_wait�mem_http2_query_buffer�mem_http2_response_buffer�qtls_resume�
rpz_actioncCs:tj�}y|jj|�Wntjk
r4||_YnXdS)N)rZnew_ub_server_statsrrQr2r3)r'rrrrrE�s
zub_server_stats.__init__cCsdS)Nr)r'rrrrI�sN)�rr5r8r!r%r.r�r6r1rZub_server_stats_num_queries_setZub_server_stats_num_queries_getr#r�r�Z.ub_server_stats_num_queries_ip_ratelimited_setZ.ub_server_stats_num_queries_ip_ratelimited_getr�Z,ub_server_stats_num_queries_missed_cache_setZ,ub_server_stats_num_queries_missed_cache_getr�Z(ub_server_stats_num_queries_prefetch_setZ(ub_server_stats_num_queries_prefetch_getr�Z'ub_server_stats_sum_query_list_size_setZ'ub_server_stats_sum_query_list_size_getr�Z'ub_server_stats_max_query_list_size_setZ'ub_server_stats_max_query_list_size_getr�Zub_server_stats_extended_setZub_server_stats_extended_getr�Zub_server_stats_qtype_setZub_server_stats_qtype_getrlZub_server_stats_qtype_big_setZub_server_stats_qtype_big_getr�Zub_server_stats_qclass_setZub_server_stats_qclass_getrmZub_server_stats_qclass_big_setZub_server_stats_qclass_big_getr�Zub_server_stats_qopcode_setZub_server_stats_qopcode_getr�Zub_server_stats_qtcp_setZub_server_stats_qtcp_getr�Z!ub_server_stats_qtcp_outgoing_setZ!ub_server_stats_qtcp_outgoing_getr�Z!ub_server_stats_qudp_outgoing_setZ!ub_server_stats_qudp_outgoing_getr�Zub_server_stats_qtls_setZub_server_stats_qtls_getr�Zub_server_stats_qhttps_setZub_server_stats_qhttps_getr�Zub_server_stats_qipv6_setZub_server_stats_qipv6_getr�Zub_server_stats_qbit_QR_setZub_server_stats_qbit_QR_getr�Zub_server_stats_qbit_AA_setZub_server_stats_qbit_AA_getr�Zub_server_stats_qbit_TC_setZub_server_stats_qbit_TC_getr�Zub_server_stats_qbit_RD_setZub_server_stats_qbit_RD_getr�Zub_server_stats_qbit_RA_setZub_server_stats_qbit_RA_getr�Zub_server_stats_qbit_Z_setZub_server_stats_qbit_Z_getr�Zub_server_stats_qbit_AD_setZub_server_stats_qbit_AD_getr�Zub_server_stats_qbit_CD_setZub_server_stats_qbit_CD_getr�Zub_server_stats_qEDNS_setZub_server_stats_qEDNS_getr�Zub_server_stats_qEDNS_DO_setZub_server_stats_qEDNS_DO_getr�Zub_server_stats_ans_rcode_setZub_server_stats_ans_rcode_getr�Z$ub_server_stats_ans_rcode_nodata_setZ$ub_server_stats_ans_rcode_nodata_getr�Zub_server_stats_ans_secure_setZub_server_stats_ans_secure_getr�Zub_server_stats_ans_bogus_setZub_server_stats_ans_bogus_getr�Zub_server_stats_rrset_bogus_setZub_server_stats_rrset_bogus_getr�Z'ub_server_stats_queries_ratelimited_setZ'ub_server_stats_queries_ratelimited_getr�Z$ub_server_stats_unwanted_replies_setZ$ub_server_stats_unwanted_replies_getr�Z$ub_server_stats_unwanted_queries_setZ$ub_server_stats_unwanted_queries_getr�Z$ub_server_stats_tcp_accept_usage_setZ$ub_server_stats_tcp_accept_usage_getr�Zub_server_stats_ans_expired_setZub_server_stats_ans_expired_getr�Zub_server_stats_hist_setZub_server_stats_hist_getr�Z#ub_server_stats_msg_cache_count_setZ#ub_server_stats_msg_cache_count_getr�Z%ub_server_stats_rrset_cache_count_setZ%ub_server_stats_rrset_cache_count_getr�Z%ub_server_stats_infra_cache_count_setZ%ub_server_stats_infra_cache_count_getr�Z#ub_server_stats_key_cache_count_setZ#ub_server_stats_key_cache_count_getr�Z.ub_server_stats_num_query_dnscrypt_crypted_setZ.ub_server_stats_num_query_dnscrypt_crypted_getr�Z+ub_server_stats_num_query_dnscrypt_cert_setZ+ub_server_stats_num_query_dnscrypt_cert_getr�Z0ub_server_stats_num_query_dnscrypt_cleartext_setZ0ub_server_stats_num_query_dnscrypt_cleartext_getr�Z8ub_server_stats_num_query_dnscrypt_crypted_malformed_setZ8ub_server_stats_num_query_dnscrypt_crypted_malformed_getrZ:ub_server_stats_num_query_dnscrypt_secret_missed_cache_setZ:ub_server_stats_num_query_dnscrypt_secret_missed_cache_getrZ-ub_server_stats_shared_secret_cache_count_setZ-ub_server_stats_shared_secret_cache_count_getrZ-ub_server_stats_num_query_dnscrypt_replay_setZ-ub_server_stats_num_query_dnscrypt_replay_getrZ%ub_server_stats_nonce_cache_count_setZ%ub_server_stats_nonce_cache_count_getrZ)ub_server_stats_num_query_authzone_up_setZ)ub_server_stats_num_query_authzone_up_getrZ+ub_server_stats_num_query_authzone_down_setZ+ub_server_stats_num_query_authzone_down_getrZ)ub_server_stats_num_neg_cache_noerror_setZ)ub_server_stats_num_neg_cache_noerror_getrZ*ub_server_stats_num_neg_cache_nxdomain_setZ*ub_server_stats_num_neg_cache_nxdomain_getrZ$ub_server_stats_num_query_subnet_setZ$ub_server_stats_num_query_subnet_getr	Z*ub_server_stats_num_query_subnet_cache_setZ*ub_server_stats_num_query_subnet_cache_getr
Z#ub_server_stats_mem_stream_wait_setZ#ub_server_stats_mem_stream_wait_getrZ*ub_server_stats_mem_http2_query_buffer_setZ*ub_server_stats_mem_http2_query_buffer_getrZ-ub_server_stats_mem_http2_response_buffer_setZ-ub_server_stats_mem_http2_response_buffer_getr
Zub_server_stats_qtls_resume_setZub_server_stats_qtls_resume_getrZub_server_stats_rpz_action_setZub_server_stats_rpz_action_getrrEZdelete_ub_server_statsr�r�rrrrr��s



























































































































r�c@s�eZdZiZdd�ZiZdd�ZeZe	j
ed<e	jed<erJe
e	je	j
�Ze	jed<e	jed<erpe
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed<e	jed<er�e
e	je	j�Ze	jed	<e	jed	<e�r
e
e	je	j�Ze	jed
<e	jed
<e�r2e
e	je	j�Z e	j!ed<e	j"ed<e�rZe
e	j"e	j!�Z#e	j$ed<e	j%ed<e�r�e
e	j%e	j$�Z&d
d�Z'e	j(Z)dd�Z*dS)�
ub_stats_infocCst|t||�S)N)r-r)r'r)r*rrrrI�szub_stats_info.<lambda>cCst|t|�S)N)r/r)r'r)rrrrI�s�svr�mesh_num_states�mesh_num_reply_states�mesh_jostled�mesh_dropped�mesh_replies_sent�mesh_replies_sum_wait_sec�mesh_replies_sum_wait_usec�mesh_time_mediancCs:tj�}y|jj|�Wntjk
r4||_YnXdS)N)rZnew_ub_stats_inforrQr2r3)r'rrrrrE�s
zub_stats_info.__init__cCsdS)Nr)r'rrrrI�sN)+rr5r8r!r%r.r�r6r1rZub_stats_info_svr_setZub_stats_info_svr_getr#r�rZ!ub_stats_info_mesh_num_states_setZ!ub_stats_info_mesh_num_states_getrZ'ub_stats_info_mesh_num_reply_states_setZ'ub_stats_info_mesh_num_reply_states_getrZub_stats_info_mesh_jostled_setZub_stats_info_mesh_jostled_getrZub_stats_info_mesh_dropped_setZub_stats_info_mesh_dropped_getrZ#ub_stats_info_mesh_replies_sent_setZ#ub_stats_info_mesh_replies_sent_getrZ+ub_stats_info_mesh_replies_sum_wait_sec_setZ+ub_stats_info_mesh_replies_sum_wait_sec_getrZ,ub_stats_info_mesh_replies_sum_wait_usec_setZ,ub_stats_info_mesh_replies_sum_wait_usec_getrZ"ub_stats_info_mesh_time_median_setZ"ub_stats_info_mesh_time_median_getrrEZdelete_ub_stats_infor�r�rrrrr�sX

















rc@seZdZdZiZdd�ZiZdd�Zdd�Ze	Z
dd�ZejZ
dd	�Zd
d�Zdd
�Zdd�Zdd�Zd;dd�Zdd�Zd<dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Z d0d1�Z!d2d3�Z"e#e$fd4d5�Z%e#e$fd6d7�Z&d8d9�Z'd:S)=�ub_ctxam
    Unbound resolving and validation context. 

    The validation context is created to hold the resolver status, validation keys and a small cache (containing messages, rrsets, roundtrip times, trusted keys, lameness information).

    **Usage**

    >>> import unbound
    >>> ctx = unbound.ub_ctx()
    >>> ctx.resolvconf("/etc/resolv.conf")
    >>> status, result = ctx.resolve("www.google.com", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
    >>> if status==0 and result.havedata:
    >>>    print "Result:",result.data.address_list
    Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104']

    cCst|t||�S)N)r-r)r'r)r*rrrrIszub_ctx.<lambda>cCst|t|�S)N)r/r)r'r)rrrrIscOstd��dS)NzNo constructor defined)r&)r'rirjrrrrEszub_ctx.__init__cCstj�|_|jstd��dS)z�Creates a resolving and validation context.

           An exception is invoked if the process of creation an ub_ctx instance fails.
        z2Fatal error: unbound context initialization failedN)rr�rr3)r'rrrrEs
cCstj||�S)aPAdd a trust anchor to the given context.

           The trust anchor is a string, on one line, that holds a valid DNSKEY or DS RR.

           :param ta:
               string, with zone-format RR on one line. [domainname] [TTL optional] [type] [class optional] [rdata contents]
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�add_tas	z
ub_ctx.add_tacCstj||�S)aAdd trust anchors to the given context.

           Pass name of a file with DS and DNSKEY records (like from dig or drill).

           :param fname:
               filename of file with keyfile with trust anchors.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�add_ta_file%s	zub_ctx.add_ta_filecCstj||�S)a\setup configuration for the given context.

           :param fname:
               unbound config file (not all settings applicable). This is a power-users interface that lets you specify all sorts of options. For some specific options, such as adding trust anchors, special routines exist.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�config2sz
ub_ctx.configcCstj||�S)z�Set debug verbosity for the context Output is directed to stderr.

           :param d:
               debug level, 0 is off, 1 is very minimal, 2 is detailed, and 3 is lots.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�
debuglevel=szub_ctx.debuglevelcCstj||�S)a�Set debug output (and error output) to the specified stream.

           Pass None to disable. Default is stderr.

           :param out:
               File stream to log to.
           :returns: (int) 0 if OK, else error.

           **Usage:**

              In order to log into file, use

              ::

                ctx = unbound.ub_ctx()
                fw = fopen("debug.log")
                ctx.debuglevel(3)
                ctx.debugout(fw)

              Another option is to print the debug information to stderr output

              ::

                ctx = unbound.ub_ctx()
                ctx.debuglevel(10)
                ctx.debugout(sys.stderr) 
        )r�ub_ctx_debugout)r'�outrrr�debugoutHszub_ctx.debugout�
/etc/hostscCstj||�S)a"Read list of hosts from the filename given.

           Usually "/etc/hosts". These addresses are not flagged as DNSSEC secure when queried for.

           :param fname:
               file name string. If None "/etc/hosts" is used.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�hostshs	zub_ctx.hostscCs
tj|�S)z�Print the local zones and their content (RR data) to the debug output.

           :returns: (int) 0 if OK, else error.
        )rr�)r'rrr�print_local_zonesuszub_ctx.print_local_zones�/etc/resolv.confcCstj||�S)a�Read list of nameservers to use from the filename given.

           Usually "/etc/resolv.conf". Uses those nameservers as caching proxies. If they do not support DNSSEC, validation may fail.

           Only nameservers are picked up, the searchdomain, ndots and other settings from resolv.conf(5) are ignored.

           :param fname:
               file name string. If None "/etc/resolv.conf" is used.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�
resolvconf~szub_ctx.resolvconfcCstj||�S)a�Set a context behaviour for asynchronous action.

           :param dothread:
               if True, enables threading and a call to :meth:`resolve_async` creates a thread to handle work in the background. 
               If False, a process is forked to handle work in the background. 
               Changes to this setting after :meth:`async` calls have been made have no effect (delete and re-create the context to change).
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�	set_async�s	zub_ctx.set_asynccCstj||�S)aoSet machine to forward DNS queries to, the caching resolver to use.

           IP4 or IP6 address. Forwards all DNS requests to that machine, which is expected to run a recursive resolver. If the  is not DNSSEC-capable, validation may fail. Can be called several times, in that case the addresses are used as backup servers.

           To read the list of nameservers from /etc/resolv.conf (from DHCP or so), use the call :meth:`resolvconf`.

           :param addr:
               address, IP4 or IP6 in string format. If the addr is None, forwarding is disabled.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�set_fwd�szub_ctx.set_fwdcCstj|||�S)a�Set an option for the context.

           Changes to the options after :meth:`resolve`, :meth:`resolve_async`, :meth:`zone_add`, :meth:`zone_remove`, :meth:`data_add` or :meth:`data_remove` have no effect (you have to delete and re-create the context).

           :param opt:
               option name from the unbound.conf config file format. (not all settings applicable). The name includes the trailing ':' for example set_option("logfile:", "mylog.txt"); This is a power-users interface that lets you specify all sorts of options. For some specific options, such as adding trust anchors, special routines exist.
           :param val:
               value of the option.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�r�rrr�
set_option�szub_ctx.set_optioncCstj||�S)aAdd trust anchors to the given context.

           Pass the name of a bind-style config file with trusted-keys{}.

           :param fname:
               filename of file with bind-style config entries with trust anchors.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�trustedkeys�s	zub_ctx.trustedkeyscCstj|�dS)z Print local zones using debugoutN)rr�)r'rrr�
zone_print�szub_ctx.zone_printcCstj|||�S)z�Add new local zone

           :param zonename: zone domain name (e.g. myzone.)
           :param zonetype: type of the zone ("static",...) 
           :returns: (int) 0 if OK, else error. 
        )rr�)r'�zonenameZzonetyperrr�zone_add�szub_ctx.zone_addcCstj||�S)z�Remove local zone

           If exists, removes local zone with all the RRs.

           :param zonename: zone domain name
           :returns: (int) 0 if OK, else error. 
        )rr�)r'r,rrr�zone_remove�szub_ctx.zone_removecCstj||�S)a�Add new local RR data

           :param rrdata: string, in zone-format on one line. [domainname] [TTL optional] [type] [class optional] [rdata contents]
           :returns: (int) 0 if OK, else error. 

           **Usage**
              The local data ...

              ::

                >>> ctx = unbound.ub_ctx()
                >>> ctx.zone_add("mydomain.net.","static")
                0
                >>> status = ctx.data_add("test.mydomain.net. IN A 192.168.1.1")
                0
                >>> status, result = ctx.resolve("test.mydomain.net")
                >>> if status==0 and result.havedata:
                >>>    print "Result:",result.data.address_list
                Result: ['192.168.1.1']

        )rr�)r'�rrdatarrr�data_add�szub_ctx.data_addcCstj||�S)aRemove local RR data

           If exists, remove resource record from local zone

           :param rrdata: string, in zone-format on one line. [domainname] [TTL optional] [type] [class optional] [rdata contents]
           :returns: (int) 0 if OK, else error. 
        )rr�)r'r/rrr�data_remove�szub_ctx.data_removecCstj||�S)z�Cancel an async query in progress.

           Its callback will not be called.

           :param async_id:
               which query to cancel.
           :returns: (int) 0 if OK, else error.
        )rr�)r'r�rrr�cancels	z
ub_ctx.cancelcCs
tj|�S)ajGet file descriptor.

           Wait for it to become readable, at this point answers are returned from the asynchronous validating resolver. Then call the ub_process to continue processing. This routine works immediately after context creation, the fd does not change.

           :returns: (int) -1 on error, or file descriptor to use select(2) with.
        )rr�)r'rrr�get_fdsz
ub_ctx.get_fdcCs
tj|�S)a:Poll a context to see if it has any new results Do not poll in a loop, instead extract the fd below to poll for readiness, and then check, or wait using the wait routine.

           :returns: (int) 0 if nothing to read, or nonzero if a result is available. If nonzero, call ctx_process() to do callbacks.
        )rr�)r'rrr�poll szub_ctx.pollcCs
tj|�S)z�Call this routine to continue processing results from the validating resolver (when the fd becomes readable).

           Will perform necessary callbacks.

           :returns: (int) 0 if OK, else error.
        )rr�)r'rrr�process)szub_ctx.processcCs2t|t�rtj||||�Stj|t|�||�SdS)a�Perform resolution and validation of the target name. 

           :param name:
               domain name in text format (a string or unicode string). IDN domain name have to be passed as a unicode string.
           :param rrtype:
               type of RR in host order (optional argument). Default value is RR_TYPE_A (A class).
           :param rrclass:
               class of RR in host order (optional argument). Default value is RR_CLASS_IN (for internet).
           :returns: * (int) 0 if OK, else error.
                     * (:class:`ub_result`) the result data is returned in a newly allocated result structure. May be None on return, return value is set to an error in that case (out of memory).
        N)r:r9rr��	idn2dname)r'r)r�r�rrr�resolve4s
zub_ctx.resolvecCs:t|t�rtj||||||�Stj|t|�||||�SdS)aKPerform resolution and validation of the target name.

           Asynchronous, after a while, the callback will be called with your data and the result. 
           If an error happens during processing, your callback will be called with error set to a nonzero value (and result==None).

           :param name:
               domain name in text format (a string or unicode string). IDN domain name have to be passed as a unicode string.
           :param mydata:
               this data is your own data (you can pass arbitrary python object or None) which are passed on to the callback function.
           :param callback:
               call-back function which is called on completion of the resolution. 
           :param rrtype:
               type of RR in host order (optional argument). Default value is RR_TYPE_A (A class).
           :param rrclass:
               class of RR in host order (optional argument). Default value is RR_CLASS_IN (for internet).
           :returns: * (int) 0 if OK, else error.
                     * (int) async_id, an identifier number is returned for the query as it is in progress. It can be used to cancel the query.

           **Call-back function:**
                The call-back function looks as the follows::

                    def call_back(mydata, status, result):
                        pass

                **Parameters:** 
                    * `mydata` - mydata object
                    * `status` - 0 when a result has been found
                    * `result` - the result structure. The result may be None, in that case err is set.

        N)r:r9r�_ub_resolve_asyncr6)r'r)r�r�r�r�rrr�
resolve_asyncGs
zub_ctx.resolve_asynccCs
tj|�S)z�Wait for a context to finish with results.

           Calls  after the wait for you. After the wait, there are no more outstanding asynchronous queries.

           :returns: (int) 0 if OK, else error.
        )rr�)r'rrr�waitmszub_ctx.waitN)r")r%)(rr5r8rdr!r%r.r�rEr6r1rr�r�rrrrr!r#r$r&r'r(r)r*r+r-r.r0r1r2r3r4r5�	RR_TYPE_A�RR_CLASS_INr7r9r:rrrrr�sB


 

	



	&rcGs
tj|�S)N)rr)rirrrr~srcCstj||||||�S)N)rr8)r�r)r�r�r�Zpyfuncrrrr8�sr8cCs$djdd�|jd�D�ddd��S)zbReverse domain name

       Usable for reverse lookups when the IP address should be reversed
    rcSsg|]}|�qSrr)rKrLrrrrM�szreverse.<locals>.<listcomp>Nr���)r
�split)Zdomainrrr�reverse�sr?cCsdjdd�|jd�D��S)z�Converts domain name in IDN format to canonic domain name

       :param idnname: (unicode string) IDN name
       :returns: (string) domain name
    rcSs g|]}|rtjj|�nd�qS)r0)r]r^ZToASCII)rKrLrrrrM�szidn2dname.<locals>.<listcomp>)r
r>)Zidnnamerrrr6�sr6cCsdjdd�|jd�D��S)z�Converts canonic domain name in IDN format to unicode string

        :param name: (string) domain name
        :returns: (unicode string) domain name
    rcSsg|]}tjj|��qSr)r]r^r_)rKrLrrrrM�szdname2idn.<locals>.<listcomp>)r
r>)r)rrr�	dname2idn�sr@)rrr)rrr)r)��sysrZ_swig_python_version_inforrrfr��	NameErrorr<r2r
r,r-r/r6r$r7r#r3Zencodings.idnar]�varsrRr9r=r?r;Z
RR_TYPE_NSZ
RR_TYPE_MDZ
RR_TYPE_MFZ
RR_TYPE_CNAMEZRR_TYPE_SOAZ
RR_TYPE_MBZ
RR_TYPE_MGZ
RR_TYPE_MRZRR_TYPE_NULLZRR_TYPE_WKSZRR_TYPE_PTRZ
RR_TYPE_HINFOZ
RR_TYPE_MINFOZ
RR_TYPE_MXZRR_TYPE_TXTZ
RR_TYPE_RPZ
RR_TYPE_AFSDBZRR_TYPE_X25ZRR_TYPE_ISDNZ
RR_TYPE_RTZRR_TYPE_NSAPZRR_TYPE_NSAP_PTRZRR_TYPE_SIGZRR_TYPE_KEYZ
RR_TYPE_PXZRR_TYPE_GPOSZRR_TYPE_AAAAZRR_TYPE_LOCZRR_TYPE_NXTZRR_TYPE_EIDZRR_TYPE_NIMLOCZRR_TYPE_SRVZRR_TYPE_ATMAZ
RR_TYPE_NAPTRZ
RR_TYPE_KXZRR_TYPE_CERTZ
RR_TYPE_A6Z
RR_TYPE_DNAMEZRR_TYPE_SINKZRR_TYPE_OPTZRR_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_UINFOZRR_TYPE_UIDZRR_TYPE_GIDZRR_TYPE_UNSPECZRR_TYPE_TSIGZRR_TYPE_IXFRZRR_TYPE_AXFRZ
RR_TYPE_MAILBZ
RR_TYPE_MAILAZRR_TYPE_ANYZRR_TYPE_CAAZRR_TYPE_DLVr<ZRR_CLASS_CHZRR_CLASS_HSZ
RR_CLASS_NONEZRR_CLASS_ANYrAr�r�r�r�r�r�r�r�r�r�r�rCZUNBOUND_VERSION_MAJORZUNBOUND_VERSION_MINORZUNBOUND_VERSION_MICROZUNBOUND_VERSION_MAJOR_REALZUNBOUND_VERSION_MINOR_REALZUNBOUND_VERSION_MICRO_REALrhZub_result_swigregisterZ
UB_NOERRORZ	UB_SOCKETZUB_NOMEMZ	UB_SYNTAXZUB_SERVFAILZUB_FORKFAILZ
UB_AFTERFINALZUB_INITFAILZUB_PIPEZUB_READFILEZUB_NOIDr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Zub_shm_stat_info_swigregisterr�Z!ub_shm_stat_info_mem_swigregisterr�Z"ub_shm_stat_info_time_swigregisterZUB_STATS_QTYPE_NUMZUB_STATS_QCLASS_NUMZUB_STATS_RCODE_NUMZUB_STATS_OPCODE_NUMZUB_STATS_BUCKET_NUMZUB_STATS_RPZ_ACTION_NUMr�Zub_server_stats_swigregisterrZub_stats_info_swigregisterrZub_ctx_swigregisterrr8r?r6r@rrrr�<module>s�
	
Zv7'	3


Hacked By AnonymousFox1.0, Coded By AnonymousFox