%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/dns/__pycache__/rdata.cpython-312.pyc

�

5��es���UdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZdZdZGd�dej8j:�Zed	fd
�Zed	fd�Z ed	fd�Z!d
Z"d�Z#d�Z$ejJjLZ'ejJjJGd�d��Z(ejJjJGd�de(��Z)iZ*ee
ejVjXejZj\fe
fe/d<dZ0d�Z1				d-deejVjXe2fdeejZj\e2fdeejfjhe2fdeejjjlde7deejjjldeejjjpde(fd�Z9	d.deejVjXe2fdeejZj\e2fd ejtjvdeejjjlde(f
d!�Z<	d.deejVjXe2fdeejZj\e2fd"e=d#e>d$e>deejjjlde(fd%�Z?Gd&�d'ej8j:�Z@d(ejVj�fd)e
de>d*e2d+e7dejVjXddfd,�ZBy)/z
DNS rdata.�N)�
import_module)�Any�Dict�Optional�Tuple�Union� Tc��eZdZdZy)�NoRelativeRdataOrderingz�An attempt was made to do an ordered comparison of one or more
    rdata with relative names.  The only reliable way of sorting rdata
    is to use non-relativized rdata.

    N)�__name__�
__module__�__qualname__�__doc__���+/usr/lib/python3/dist-packages/dns/rdata.pyrr3s��rr� c	��|s|j�S|jtdt|�|�D�cgc]
}||||z��c}�j�Scc}w)zXBreak a binary string into chunks of chunksize characters separated by
    a space.
    r)�decode�join�range�len)�data�	chunksize�	separator�is    r�
_wordbreakr;sT��
��{�{�}���>�>�*/��3�t�9�i�*H�I�Q��a�!�i�-�	 �I���f�h���Is�Ac�B�ttj|�||�S)zConvert a binary string into its hex encoding, broken up into chunks
    of chunksize characters separated by a separator.
    )r�binascii�hexlify�rrr�kws    r�_hexifyr#Js��
�h�&�&�t�,�i��C�Crc�B�ttj|�||�S)z�Convert a binary string into its base64 encoding, broken up into chunks
    of chunksize characters separated by a separator.
    )r�base64�	b64encoder!s    r�
_base64ifyr'Rs��
�f�&�&�t�,�i��C�Crs"\c��t|t�r|j�}t|t�st|�}d}|D]=}|tvr|dt|�zz
}�|dk\r|dkr|t|�z
}�6|d|zz
}�?|S)z7Escape the characters in a quoted string which need it.��\r	�z\%03d)�
isinstance�str�encode�	bytearray�	__escaped�chr)�qstring�text�cs   r�	_escapifyr5_s����'�3���.�.�"���g�y�)��G�$��
�D�
�!���	�>��D�3�q�6�M�!�D�
�$�Y�1�t�8��C��F�N�D��H�q�L� �D�
!��Krc�l�tt|�dz
dd�D]}||dk7s�|d|dzcS|ddS)z�Determine the index of greatest byte that isn't all zeros, and
    return the bitmap that contains all the bytes less than that index.
    ����r)rr)�whatrs  r�_truncate_bitmapr:rsM��
�3�t�9�q�=�"�b�
)�#����7�a�<���A��E�?�"�#���!�9�rc��eZdZdZgd�Zd�Zd�Zd�Zd�Zde	jjfd�Zde
fd	�Z		d=dee	j j"ded
eeefdefd�Z			d>deedee	j j.dee	j j"dedef
d�Z				d?deedee	j j.dee	j j"dedef
d�Z	d@dee	j j"ddfd�Zd@dee	j j"defd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d �Z&e'			dAd!e	jPjRd"e	jjd#e	jTjVdee	j j"ded$ee	j j"ddfd%��Z,e'	d@d!e	jPjRd"e	jjd&e	jZj\dee	j j"ddf
d'��Z/d(eddfd)�Z0e'd*��Z1e'd+��Z2e'			dBd,ed-ed.ee
d/edef
d0��Z3e'd1��Z4e'd2��Z5e'd3��Z6e'd4��Z7e'd5��Z8e'dCd6��Z9e'd7��Z:e'd8��Z;e'd9��Z<e'd:��Z=e'd;��Z>e'd<��Z?y
)D�Rdataz#Base class for all DNS rdata types.)�rdclass�rdtype�	rdcommentc�j�|j|�|_|j|�|_d|_y)z�Initialize an rdata.

        *rdclass*, an ``int`` is the rdataclass of the Rdata.

        *rdtype*, an ``int`` is the rdatatype of the Rdata.
        N)�_as_rdataclassr=�
_as_rdatatyper>r?)�selfr=r>s   r�__init__zRdata.__init__�s/���*�*�7�3����(�(��0�����rc�v�tjjd�|jjD��S)Nc3�6K�|]}t|dg����y�w)�	__slots__N)�getattr)�.0�clss  r�	<genexpr>z'Rdata._get_all_slots.<locals>.<genexpr>�s����-
�.1�G�C��b�)�-
�s�)�	itertools�chain�
from_iterable�	__class__�__mro__�rCs r�_get_all_slotszRdata._get_all_slots�s0�����,�,�-
�59�^�^�5K�5K�-
�
�	
rc�R�i}|j�D]}t||�||<�|S�N)rRrH)rC�state�slots   r�__getstate__zRdata.__getstate__�s6�����'�'�)�	.�D�!�$��-�E�$�K�	.��rc��|j�D]\}}tj|||��t|d�stj|dd�yy)Nr?)�items�object�__setattr__�hasattr)rCrUrV�vals    r�__setstate__zRdata.__setstate__�sP������	0�I�D�#����t�T�3�/�	0��t�[�)�
���t�[�$�7�*r�returnc�6�tjjS)a�Return the type a Rdata covers.

        DNS SIG/RRSIG rdatas apply to a specific type; this type is
        returned by the covers() function.  If the rdata type is not
        SIG or RRSIG, dns.rdatatype.NONE is returned.  This is useful when
        creating rdatasets, allowing the rdataset to contain only RRSIGs
        of a particular type, e.g. RRSIG(NS).

        Returns a ``dns.rdatatype.RdataType``.
        )�dns�	rdatatype�NONErQs r�coverszRdata.covers�s���}�}�!�!�!rc�B�|j�dz|jzS)z�Return a 32-bit type value, the least significant 16 bits of
        which are the ordinary DNS type, and the upper 16 bits of which are
        the "covered" type, if any.

        Returns an ``int``.
        �)rdr>rQs r�extended_rdatatypezRdata.extended_rdatatype�s���{�{�}��"�T�[�[�0�0rN�origin�
relativizer"c��t�)zEConvert an rdata to text format.

        Returns a ``str``.
        ��NotImplementedError�rCrhrir"s    r�to_textz
Rdata.to_text�s
��"�!r�file�compress�canonicalizec��t�rTrk�rCrorprhrqs     r�_to_wirezRdata._to_wire�s
��"�!rc��|r|j||||�Stj�}|j||||�|j�S)zSConvert an rdata to wire format.

        Returns a ``bytes`` or ``None``.
        )rt�io�BytesIO�getvalue)rCrorprhrq�fs      r�to_wirez
Rdata.to_wire�sE����=�=��x���F�F��
�
��A��M�M�!�X�v�|�<��:�:�<�rzdns.rdata.GenericRdatac��tjj|j|j|j|���S)zrCreates a dns.rdata.GenericRdata equivalent of this rdata.

        Returns a ``dns.rdata.GenericRdata``.
        )rh)ra�rdata�GenericRdatar=r>rz�rCrhs  r�
to_genericzRdata.to_generic�s5���y�y�%�%��L�L�$�+�+�t�|�|�6�|�'B�
�	
rc�(�|j|d��S)z�Convert rdata to a format suitable for digesting in hashes.  This
        is also the DNSSEC canonical form.

        Returns a ``bytes``.
        T)rhrq)rzr~s  r�
to_digestablezRdata.to_digestable�s���|�|�6��|�=�=rc��|j�}|tjjk(rd}n%dtjj	|�zdz}dtj
j	|j�zdztjj	|j�z|zdzt|�zdzS)Nr)�(�)z<DNS � z rdata: �>)	rdrarbrcrn�
rdataclassr=r>r-)rCrd�ctexts   r�__repr__zRdata.__repr__s���������S�]�]�'�'�'��E��#�-�-�/�/��7�7�#�=�E���n�n�$�$�T�\�\�2�
3��
��m�m�#�#�D�K�K�0�
1��	
�
�
��$�i�

��
�		
rc�"�|j�SrT)rnrQs r�__str__z
Rdata.__str__s���|�|�~�rc���	|j�}d}	|j�}d}tr	||k7r|ryy|s|rt�k(ry||kDryy#tjj$r4tr)|jtjj
�}d}Y��wxYw#tjj$r4tr)|jtjj
�}d}Y��wxYw)aCompare an rdata with another rdata of the same rdtype and
        rdclass.

        For rdata with only absolute names:
            Return < 0 if self < other in the DNSSEC ordering, 0 if self
            == other, and > 0 if self > other.
        For rdata with at least one relative names:
            The rdata sorts before any rdata with only absolute names.
            When compared with another relative rdata, all names are
            made absolute as if they were relative to the root, as the
            proper origin is not available.  While this creates a stable
            ordering, it is NOT guaranteed to be the DNSSEC ordering.
            In the future, all ordering comparisons for rdata with
            relative names will be disallowed.
        FTr8r7r)r�ra�name�NeedAbsoluteNameOrOrigin�_allow_relative_comparisons�rootr)rC�other�our�our_relative�their�their_relatives      r�_cmpz
Rdata._cmps��� 	 ��$�$�&�C� �L�
	"��'�'�)�E�"�N�
'��~�-� ���
�^�)�)��%�<��
�5�[����5�x�x�0�0�	 �*��(�(������7���L�	 ���x�x�0�0�	"�*��+�+�C�H�H�M�M�:��!�N�	"�s$�A
�B!�
AB�B�!AC2�1C2c�$�t|t�sy|j|jk7s|j|jk7ryd}d}	|j	�}	|j	�}||k7ry||k(S#t
jj$r.|j	t
jj�}d}Y�fwxYw#t
jj$r.|j	t
jj�}d}Y��wxYw)NFT)	r,r<r=r>r�rar�r�r�)rCr�r�r�r�r�s      r�__eq__zRdata.__eq__Fs����%��'���<�<�5�=�=�(�D�K�K�5�<�<�,G������	 ��$�$�&�C�	"��'�'�)�E��>�)���e�|����x�x�0�0�	 ��$�$�S�X�X�]�]�3�C��L�	 ��
�x�x�0�0�	"��'�'����
�
�6�E�!�N�	"�s&�
A6�C�6AC�C�AD�Dc��t|t�sy|j|jk7s|j|jk7ry|j	|�S�NT)r,r<r=r>r��rCr�s  r�__ne__zRdata.__ne__[sC���%��'���<�<�5�=�=�(�D�K�K�5�<�<�,G���;�;�u�%�%�%rc��t|t�r2|j|jk7s|j|jk7rtS|j|�dkS�Nr�r,r<r=r>�NotImplementedr�r�s  r�__lt__zRdata.__lt__b�F���5�%�(��|�|�u�}�}�,��{�{�e�l�l�*�!�!��y�y���!�#�#rc��t|t�r2|j|jk7s|j|jk7rtS|j|�dkSr�r�r�s  r�__le__zRdata.__le__k�F���5�%�(��|�|�u�}�}�,��{�{�e�l�l�*�!�!��y�y���1�$�$rc��t|t�r2|j|jk7s|j|jk7rtS|j|�dk\Sr�r�r�s  r�__ge__zRdata.__ge__tr�rc��t|t�r2|j|jk7s|j|jk7rtS|j|�dkDSr�r�r�s  r�__gt__zRdata.__gt__}r�rc�f�t|jtjj��SrT)�hashr�rar�r�rQs r�__hash__zRdata.__hash__�s ���D�&�&�s�x�x�}�}�5�6�6rr=r>�tok�
relativize_toc��t�rTrk)rJr=r>r�rhrir�s       r�	from_textzRdata.from_text�s
��"�!r�parserc��t�rTrk�rJr=r>r�rhs     r�from_wire_parserzRdata.from_wire_parser�s
��"�!r�kwargsc�����tj�j�j}�D]n}|dk(r�	||vr/t	dj�jj|���|dvs�At	dj�jj|�����fd�|D�}�j|�}�jd�j�}|�tj|d|�|S)a�
        Create a new Rdata instance based on the instance replace was
        invoked on. It is possible to pass different parameters to
        override the corresponding properties of the base Rdata.

        Any field specific to the Rdata type can be replaced, but the
        *rdtype* and *rdclass* fields cannot.

        Returns an instance of the same Rdata subclass as *self*.
        r?z!'{}' object has no attribute '{}'�r=r>z$Cannot overwrite '{}' attribute '{}'c3�V�K�|] }�j|t�|�����"y�wrT)�getrH)rI�keyr�rCs  ��rrKz Rdata.replace.<locals>.<genexpr>�s#�����J���
�
�3���c� 2�3�J�s�&))�inspect�	signaturerD�
parameters�AttributeError�formatrOrr�r?rZr[)rCr�r�r��args�rdr?s``     r�replacez
Rdata.replace�s�����&�&�t�}�}�5�@�@�
��	�C��k�!���*�$�$�7�>�>����/�/�����
�+�+�$�:�A�A����/�/�����	�$K�z�J���T�^�^�T�
"���J�J�{�D�N�N�;�	�� ����r�;�	�:��	rc�T�tjjj|�SrT)rar��
RdataClass�make�rJ�values  rrAzRdata._as_rdataclass�s���~�~�(�(�-�-�e�4�4rc�T�tjjj|�SrT)rarb�	RdataTyper�r�s  rrBzRdata._as_rdatatype�s���}�}�&�&�+�+�E�2�2rr�r.�
max_length�empty_okc�,�|r!t|t�r|j�}n:t|t�rt	|�}nt|t�r|}ntd��|�t
|�|kDrtd��|st
|�dk(rtd��|S)Nz	not bytesztoo longrzempty bytes not allowed)r,r-r.r/�bytes�
ValueErrorr)rJr�r.r�r��bvalues      r�	_as_byteszRdata._as_bytes�s����j���,��\�\�^�F�
��y�
)��5�\�F�
��u�
%��F��[�)�)��!�c�&�k�J�&>��Z�(�(��C��K�1�,��6�7�7��
rc���t|t�rtjj	|�St|tjj
�st
d��|S)Nz
not a name)r,r-rar�r��Namer�r�s  r�_as_namezRdata._as_name�sE��
�e�S�!��8�8�%�%�e�,�,��E�3�8�8�=�=�1��\�*�*��rc�f�t|t�std��|dks|dkDrtd��|S)N�not an integerr�znot a uint8�r,�intr�r�s  r�	_as_uint8zRdata._as_uint8�s5���%��%��-�.�.��1�9�����]�+�+��rc�f�t|t�std��|dks|dkDrtd��|S)Nr�ri��znot a uint16r�r�s  r�
_as_uint16zRdata._as_uint16s5���%��%��-�.�.��1�9���
��^�,�,��rc�f�t|t�std��|dks|dkDrtd��|S)Nr�rl��znot a uint32r�r�s  r�
_as_uint32zRdata._as_uint32	s6���%��%��-�.�.��1�9��
�*��^�,�,��rc�f�t|t�std��|dks|dkDrtd��|S)Nr�rl���znot a uint48r�r�s  r�
_as_uint48zRdata._as_uint48s6���%��%��-�.�.��1�9���/��^�,�,��rc��t|t�std��|�||krtd��|�||kDrtd��|S)Nr�zvalue too smallzvalue too larger�)rJr��low�highs    r�_as_intz
Rdata._as_intsL���%��%��-�.�.��?�u�s�{��.�/�/�������.�/�/��rc���t|t�rtjj	|�St|t
�rtjj
|�Std��)Nznot an IPv4 address)r,r-ra�ipv4rqr��	inet_ntoar�r�s  r�_as_ipv4_addresszRdata._as_ipv4_address#�L���e�S�!��8�8�(�(��/�/�
��u�
%��8�8�%�%�e�,�,��2�3�3rc���t|t�rtjj	|�St|t
�rtjj
|�Std��)Nznot an IPv6 address)r,r-ra�ipv6rqr�r�r�r�s  r�_as_ipv6_addresszRdata._as_ipv6_address,r�rc�<�t|t�r|Std��)Nz
not a boolean)r,�boolr�r�s  r�_as_boolzRdata._as_bool5s���e�T�"��L��_�-�-rc���t|t�r+|j|dtjj
�St|t�rtjj|�Std��)Nrz	not a TTL)	r,r�r�ra�ttl�MAX_TTLr-r�r�r�s  r�_as_ttlz
Rdata._as_ttl<sQ���e�S�!��;�;�u�a������9�9�
��s�
#��7�7�$�$�U�+�+��[�)�)rc�^��	�|�fS#t$rt�fd�|D��cYSwxYw)Nc3�.�K�|]}�|����y�wrTr)rI�v�as_values  �rrKz"Rdata._as_tuple.<locals>.<genexpr>Ns�����4���!��4�s�)�	Exception�tuple)rJr�r�s  `r�	_as_tuplezRdata._as_tupleEs9���	5��U�O�%�%���	5��4�e�4�4�4�	5�s��,�,c�F�t|�}tj|�|SrT)�list�random�shuffle)rJ�iterablerYs   r�_processing_orderzRdata._processing_orderRs���X������u���rr��NNF)NNNFrT�NTN)FNT)NN)@rr
rrrGrDrRrWr^rarbr�rdr�rgrr�r�r�rr-rrn�CompressTyper�rtrzrr�r�r�r�r�r�r�r�r�r�r��classmethodr�r��	tokenizer�	Tokenizerr��wire�Parserr�r�rArBr�r�r�r�r�r�r�r�r�r�r�r�r�rrrr<r<�sQ��-�2�I�
�
�
�8�"��
�
�/�/�"�1�C�1�+/��"�������'�"��"��3��8�n�	"�


�"� 59�*.�"�"��s�m�"��3�8�8�0�0�1�"�������'�	"�
�"�
�
"�#�48�*.�"� ��s�m� ��3�8�8�0�0�1� �������'�	 �
� �
�
 �(15�	
��s�x�x�}�}�-�	
�	!�	
�>�H�S�X�X�]�]�$;�>�u�>�
�"�-�^�*&�$�%�%�$�7��+/��15�	"����*�*�	"��
�
�'�'�	"��]�]�
$�
$�		"�
������'�	"��
	"� ����
�
�.�	"�
�	"��	"��+/�"����*�*�"��
�
�'�'�"������	"�
������'�"�
�
"��"�,��,��,�b�5��5��3��3���$(��������S�M�	�
��
�
���*�������������������������4��4��4��4��.��.��*��*��5��5����rr<c	���eZdZdZdgZ�fd�Z		ddeejjde
deee
fdefd�Ze	d
d	��Zdd
�Zedd��Z�xZS)r}z�Generic Rdata Class

    This class is used for rdata types for which we have no better
    implementation.  It implements the DNS "unknown RRs" scheme.
    rc�4��t�|�||�||_yrT)�superrDr)rCr=r>rrOs    �rrDzGenericRdata.__init__cs���
����&�)���	rrhrir"r_c�`�dt|j�zt|jfi|��zS)Nz\# %d )rrr#rms    rrnzGenericRdata.to_textgs*���3�t�y�y�>�)�G�D�I�I�,D��,D�D�Drc��|j�}|j�r|jdk7rtjjd��|j
�}|jd�j�}	tj|	�}
t|
�|k7rtjjd��||||
�S)N�\#z$generic rdata does not start with \#Tz'generic rdata hex data has wrong length)r��
is_identifierr�ra�	exception�SyntaxError�get_int�!concatenate_remaining_identifiersr.r�	unhexlifyr)rJr=r>r�rhrir��token�length�hexrs           rr�zGenericRdata.from_textos������	���"�"�$����u�(<��-�-�+�+�,S�T�T�������3�3�D�9�@�@�B���!�!�#�&���t�9����-�-�+�+�,U�V�V��7�F�D�)�)rc�:�|j|j�yrT)�writerrss     rrtzGenericRdata._to_wire}s���
�
�4�9�9�rc�2�||||j��SrT)�
get_remainingr�s     rr�zGenericRdata.from_wire_parser�s���7�F�F�$8�$8�$:�;�;rr�rrrT)rr
rrrGrDrrar�r�r�rr-rrnrr�rtr��
__classcell__)rOs@rr}r}Ys�������I��+/��E�������'�E��E��3��8�n�	E�


�E��OS�*��*���<��<rr}�_rdata_classeszdns.rdtypesc���tj||f�}|s�tjtjj|f�}|s�tj
j
|�}tjj
|�}|jdd�}	tdjt||g��}t||�}|t||f<|st}|t||f<|S#t$ro	tdjtd|g��}t||�}|ttj
j|f<|t||f<n#t$rYnwxYwY��wxYw)N�-�_�.�ANY)rr�rarbr!r�rnr�rr�_module_prefixrH�ImportErrorr})r=r>rJ�rdclass_text�rdtype_text�mods      r�get_rdata_classr'�sI��
�
�
�g�v�.�
/�C��� � �#�-�-�"3�"3�V�!<�=����>�>�1�1�'�:�L��-�-�/�/��7�K�%�-�-�c�3�7�K�

�#��H�H�n�l�K�H�I����c�;�/��47����0�1����,/����(�)��J���
��'����.�%��1U�(V�W�C�!�#�{�3�C�CF�N�C�N�N�$6�$6��#?�@�8;�N�G�V�#4�5��"�����

�s7�8C)�)	E!�3AE�E!�	E�E!�E�E!� E!r=r>r�rhrir��
idna_codecr_c
��t|t�r!tjj	||��}tj
jj|�}tjjj|�}t||�}tjjtjj�5d}|tk7r�|j�}	|j!|	�|	j#�r�|	j$dk(r�tj'||||||�}
t)|||
j*dt-|
j*�|�}|j/�}||
j*k7rtjjd��|�|j'||||||�}|j1�}	|	j2�!t4j7|d|	j2�|cddd�S#1swYyxYw)a3Build an rdata object from text format.

    This function attempts to dynamically load a class which
    implements the specified rdata class and type.  If there is no
    class-and-type-specific implementation, the GenericRdata class
    is used.

    Once a class is chosen, its from_text() class method is called
    with the parameters to this function.

    If *tok* is a ``str``, then a tokenizer is created and the string
    is used as its input.

    *rdclass*, a ``dns.rdataclass.RdataClass`` or ``str``, the rdataclass.

    *rdtype*, a ``dns.rdatatype.RdataType`` or ``str``, the rdatatype.

    *tok*, a ``dns.tokenizer.Tokenizer`` or a ``str``.

    *origin*, a ``dns.name.Name`` (or ``None``), the
    origin to use for relative names.

    *relativize*, a ``bool``.  If true, name will be relativized.

    *relativize_to*, a ``dns.name.Name`` (or ``None``), the origin to use
    when relativizing names.  If not set, the *origin* value will be used.

    *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
    encoder/decoder to use if a tokenizer needs to be created.  If
    ``None``, the default IDNA 2003 encoder/decoder is used.  If a
    tokenizer is not created, then the codec associated with the tokenizer
    is the one that is used.

    Returns an instance of the chosen Rdata subclass.

    )r(Nr
rz9compressed data in generic syntax form of known rdatatyper?)r,r-rarrr�r�r�rbr�r'r�ExceptionWrapperrr}r��ungetrr�r��	from_wirerrrz�get_eol_as_token�commentrZr[)r=r>r�rhrir�r(rJr|r�grdata�rwires            rr�r��s���Z�#�s���m�m�%�%�c�j�%�A���n�n�'�'�,�,�W�5�G�
�]�]�
$�
$�
)�
)�&�
1�F�
�'�6�
*�C�	���	'�	'��
�
�(A�(A�	B�%����,���G�G�I�E��I�I�e���"�"�$�����)=�&�/�/��V�S�&�*�m���"��V�V�[�[�!�S����5E�v����
�
����F�K�K�'��-�-�3�3�-���
�=��M�M����f�j�-��E��$�$�&���=�=�$����u�k�5�=�=�A��K%�%�%�s
�D'G8�8Hr�c��tjjj|�}tjj
j|�}t
||�}tjjtjj�5|j||||�cddd�S#1swYyxYw)aBuild an rdata object from wire format

    This function attempts to dynamically load a class which
    implements the specified rdata class and type.  If there is no
    class-and-type-specific implementation, the GenericRdata class
    is used.

    Once a class is chosen, its from_wire() class method is called
    with the parameters to this function.

    *rdclass*, a ``dns.rdataclass.RdataClass`` or ``str``, the rdataclass.

    *rdtype*, a ``dns.rdatatype.RdataType`` or ``str``, the rdatatype.

    *parser*, a ``dns.wire.Parser``, the parser, which should be
    restricted to the rdata length.

    *origin*, a ``dns.name.Name`` (or ``None``).  If not ``None``,
    then names will be relativized to this origin.

    Returns an instance of the chosen Rdata subclass.
    N)rar�r�r�rbr�r'rr*�	FormErrorr�)r=r>r�rhrJs     rr�r�s���:�n�n�'�'�,�,�W�5�G�
�]�]�
$�
$�
)�
)�&�
1�F�
�'�6�
*�C�	���	'�	'��
�
�(?�(?�	@�E��#�#�G�V�V�V�D�E�E�E�s�B4�4B=r�current�rdlenc��tjj||�}|j|�5t	||||�cddd�S#1swYyxYw)a1Build an rdata object from wire format

    This function attempts to dynamically load a class which
    implements the specified rdata class and type.  If there is no
    class-and-type-specific implementation, the GenericRdata class
    is used.

    Once a class is chosen, its from_wire() class method is called
    with the parameters to this function.

    *rdclass*, an ``int``, the rdataclass.

    *rdtype*, an ``int``, the rdatatype.

    *wire*, a ``bytes``, the wire-format message.

    *current*, an ``int``, the offset in wire of the beginning of
    the rdata.

    *rdlen*, an ``int``, the length of the wire-format rdata

    *origin*, a ``dns.name.Name`` (or ``None``).  If not ``None``,
    then names will be relativized to this origin.

    Returns an instance of the chosen Rdata subclass.
    N)rarr�restrict_tor�)r=r>rr3r4rhr�s       rr,r,%sN��D�X�X�_�_�T�7�
+�F�	�	�	�E�	"�A������@�A�A�A�s�A
�
Ac��eZdZdZddhZdZy)�RdatatypeExistszDNS rdatatype already exists.r=r>zKThe rdata type with class {rdclass:d} and rdtype {rdtype:d} already exists.N)rr
rr�supp_kwargs�fmtrrrr8r8Ls��'��h�'�K�	�rr8F�implementationr%�is_singletonc�d�tjjj|�}t	||�}|t
k7stjj
|�r
t||���t||jdd��t||f<tjj|||�y)a�Dynamically register a module to handle an rdatatype.

    *implementation*, a module implementing the type in the usual dnspython
    way.

    *rdtype*, an ``int``, the rdatatype to register.

    *rdtype_text*, a ``str``, the textual form of the rdatatype.

    *is_singleton*, a ``bool``, indicating if the type is a singleton (i.e.
    RRsets of the type can have only one member.)

    *rdclass*, the rdataclass of the type, or ``dns.rdataclass.ANY`` if
    it applies to all classes.
    r�rrN)rarbr�r�r'r}�is_metatyper8rHr�r�
register_type)r;r>r%r<r=�existing_clss      rr?r?Vs���.�]�]�
$�
$�
)�
)�&�
1�F�"�7�F�3�L��|�#�s�}�}�'@�'@��'H��g�f�=�=�(/���+�+�C��5�)�N�G�V�$�%��M�M�����\�Br)NTNNrT)Crr%rr�rvrLr��	importlibr�typingrrrrr�
dns.exceptionra�
dns.immutable�dns.ipv4�dns.ipv6�dns.name�dns.rdataclass�
dns.rdatatype�
dns.tokenizer�dns.ttl�dns.wire�
_chunksizer�r�DNSExceptionrrr#r'r0r5r:�	immutable�constify�	_constifyr<r}rr�r�rbr��__annotations__r"r'r-rrr�r�r��	IDNACodecr�rrr�r�r�r,r8�INr?rrr�<module>rUs���$�
���	��
�#�4�4�����������
�
�#���c�m�m�8�8�� *�T�	�'�$�D� *�T�D�
�	��&�
�M�M�"�"�	������T�T��T�n�����(<�5�(<��(<�X���U�3�>�>�4�4�c�m�m�6M�6M�M�N�PS�S�T�����@'+��-1�/3�W�
�3�>�>�,�,�c�1�
2�W��#�-�-�)�)�3�.�/�W�
�s�}�}�&�&��+�	,�W�
�S�X�X�]�]�#�	W�
�W��C�H�H�M�M�*�
W�����+�+�,�W��W�|'+�	!E�
�3�>�>�,�,�c�1�
2�!E��#�-�-�)�)�3�.�/�!E�
�H�H�O�O�!E�
�S�X�X�]�]�#�	!E�
�!E�T'+�
$A�
�3�>�>�,�,�c�1�
2�$A��#�-�-�)�)�3�.�/�$A��$A��	$A�
�$A�
�S�X�X�]�]�#�
$A��$A�N�c�m�m�0�0���),���):�):�C��C��C��C��	C�
�^�^�
&�
&�C�
�
Cr

Zerion Mini Shell 1.0