Edit File: rdata.pyc
� �$Nc�����������@���s��d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�Z �d�d���Z�d�Z�d�d���Z �i�e�d�6e�d�6Z�d����Z�d ����Z�d �e�f�d�������YZ�d�e�f�d �������YZ�i��Z�d�Z�d����Z�d�e�d���Z�d�d���Z�d�S(���s���DNS rdata. @var _rdata_modules: A dictionary mapping a (rdclass, rdtype) tuple to the module which implements that type. @type _rdata_modules: dict @var _module_prefix: The prefix to use when forming modules names. The default is 'dns.rdtypes'. Changing this value will break the library. @type _module_prefix: string @var _hex_chunk: At most this many octets that will be represented in each chunk of hexstring that _hexify() produces before whitespace occurs. @type _hex_chunk: inti����Ni ���c���������C���s����|�d�k�r�t�}�n��|��j�d���}�t�|���}�|�|�k�r��g��}�d�}�x2�|�|�k��r|�|�j�|�|�|�|�!��|�|�7}�qK�Wd�j�|���}�n��|�S(���s��Convert a binary string into its hex encoding, broken up into chunks of I{chunksize} characters separated by a space. @param data: the binary string @type data: string @param chunksize: the chunk size. Default is L{dns.rdata._hex_chunksize} @rtype: string t ���hex_codeci����t��� N(���t���Nonet���_hex_chunksizet���encodet���lent���appendt���join(���t���datat ���chunksizet���hext���lt���chunkst���i(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���_hexify'���s���� c���������C���s����|�d�k�r�t�}�n��|��j�d���}�|�j�d�d���}�t�|���}�|�|�k�r��g��}�d�}�x2�|�|�k��r��|�j�|�|�|�|�!��|�|�7}�q]�Wd�j�|���}�n��|�S(���s$��Convert a binary string into its base64 encoding, broken up into chunks of I{chunksize} characters separated by a space. @param data: the binary string @type data: string @param chunksize: the chunk size. Default is L{dns.rdata._base64_chunksize} @rtype: string t���base64_codecs��� t����i����R���N(���R���t���_base64_chunksizeR���t���replaceR���R���R���(���R���R ���t���b64R���R���R ���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt ���_base64ify@���s���� t���"s���\c���������C���s}���d�}�xp�|��D]h�}�|�t��k�r0�|�d�|�7}�q �t�|���d�k�ra�t�|���d�k��ra�|�|�7}�q �|�d�t�|���7}�q �W|�S(���s����Escape the characters in a quoted string which need it. @param qstring: the string @type qstring: string @returns: the escaped string @rtype: string R���s���\i ���i���s���\%03d(���t ���__escapedt���ord(���t���qstringt���textt���c(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt ���_escapify^���s���� $ c���������C���sS���x8�t��t�|����d�d�d���D]�}�|��|�d�k�r�Pq�q�Wd�j�|��d�|�d�!��S(���s����Determine the index of greatest byte that isn't all zeros, and return the bitmap that contains all the bytes less than that index. @param what: a string of octets representing a bitmap. @type what: string @rtype: string i���i����s����R���i����(���t���xrangeR���R���(���t���whatR ���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���_truncate_bitmapq���s���� #t���Rdatac�����������B���s ��e��Z�d��Z�d�d�g�Z�d����Z�d����Z�d����Z�d�e�d���Z �d�d�d���Z �d�d���Z�d ����Z�d ����Z �d����Z�d����Z�d ����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d�e�d���Z�e�e���Z�d�d���Z�e�e���Z�d�e�d���Z�RS(���s(���Base class for all DNS rdata types. t���rdclasst���rdtypec���������C���s���|�|��_��|�|��_�d�S(���s����Initialize an rdata. @param rdclass: The rdata class @type rdclass: int @param rdtype: The rdata type @type rdtype: int N(���R ���R!���(���t���selfR ���R!���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__init__����s���� c���������C���s ���t��j�j�S(���s_��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). @rtype: int (���t���dnst ���rdatatypet���NONE(���R"���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���covers����s���� c���������C���s���|��j�����d�>|��j�BS(���s����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. @rtype: int i���(���R'���R!���(���R"���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���extended_rdatatype����s����c���������K���s ���t����d�S(���s@���Convert an rdata to text format. @rtype: string N(���t���NotImplementedError(���R"���t���origint ���relativizet���kw(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���to_text����s����c���������C���s ���t����d�S(���s@���Convert an rdata to wire format. @rtype: string N(���R)���(���R"���t���filet���compressR*���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���to_wire����s����c���������C���s)���t��j����}�|��j�|�d�|���|�j����S(���sl���Convert rdata to a format suitable for digesting in hashes. This is also the DNSSEC canonical form.N(���t ���cStringIOt���StringIOR0���R���t���getvalue(���R"���R*���t���f(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt ���to_digestable����s����c���������C���s&���t��j�j�|��j�|��j�|��j������d�S(���s����Check that the current contents of the rdata's fields are valid. If you change an rdata by assigning to its fields, it is a good idea to call validate() when you are done making changes. N(���R$���t���rdatat ���from_textR ���R!���R-���(���R"���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���validate����s����c���������C���s����|��j�����}�|�t�j�j�k�r'�d�}�n�d�t�j�j�|���d�}�d�t�j�j�|��j���d�t�j�j�|��j���|�d�t�|����d�S(���NR���t���(t���)s���<DNS R���s��� rdata: t���>( ���R'���R$���R%���R&���R-���t ���rdataclassR ���R!���t���str(���R"���R'���t���ctext(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__repr__����s ���� c���������C���s ���|��j�����S(���N(���R-���(���R"���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__str__����s����c���������C���s ���t����d�S(���s����Compare an rdata with another rdata of the same rdtype and rdclass. Return < 0 if self < other in the DNSSEC ordering, 0 if self == other, and > 0 if self > other. N(���R)���(���R"���t���other(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���_cmp����s����c���������C���sN���t��|�t���s�t�S|��j�|�j�k�s7�|��j�|�j�k�r;�t�S|��j�|���d�k�S(���Ni����(���t ���isinstanceR���t���FalseR ���R!���RB���(���R"���RA���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__eq__����s����c���������C���sN���t��|�t���s�t�S|��j�|�j�k�s7�|��j�|�j�k�r;�t�S|��j�|���d�k�S(���Ni����(���RC���R���t���TrueR ���R!���RB���(���R"���RA���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__ne__����s����c���������C���sK���t��|�t���s4�|��j�|�j�k�s4�|��j�|�j�k�r8�t�S|��j�|���d�k��S(���Ni����(���RC���R���R ���R!���t���NotImplementedRB���(���R"���RA���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__lt__����s ����c���������C���sK���t��|�t���s4�|��j�|�j�k�s4�|��j�|�j�k�r8�t�S|��j�|���d�k�S(���Ni����(���RC���R���R ���R!���RH���RB���(���R"���RA���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__le__����s ����c���������C���sK���t��|�t���s4�|��j�|�j�k�s4�|��j�|�j�k�r8�t�S|��j�|���d�k�S(���Ni����(���RC���R���R ���R!���RH���RB���(���R"���RA���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__ge__����s ����c���������C���sK���t��|�t���s4�|��j�|�j�k�s4�|��j�|�j�k�r8�t�S|��j�|���d�k�S(���Ni����(���RC���R���R ���R!���RH���RB���(���R"���RA���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__gt__����s ����c���������C���s���t��|��j�t�j�j�����S(���N(���t���hashR5���R$���t���namet���root(���R"���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���__hash__��s����c���������C���sc���t��j����}�|��j�|�d��t�j�j���t��j����}�|�j�|�d��t�j�j���t�|�j����|�j������S(���N( ���R1���R2���R0���R���R$���RN���RO���t���cmpR3���(���R"���RA���t���b1t���b2(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt ���_wire_cmp��s ����c���������C���s ���t����d�S(���s���Build an rdata object from text format. @param rdclass: The rdata class @type rdclass: int @param rdtype: The rdata type @type rdtype: int @param tok: The tokenizer @type tok: dns.tokenizer.Tokenizer @param origin: The origin to use for relative names @type origin: dns.name.Name @param relativize: should names be relativized? @type relativize: bool @rtype: dns.rdata.Rdata instance N(���R)���(���t���clsR ���R!���t���tokR*���R+���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyR7�����s����c���������C���s ���t����d�S(���s;��Build an rdata object from wire format @param rdclass: The rdata class @type rdclass: int @param rdtype: The rdata type @type rdtype: int @param wire: The wire-format message @type wire: string @param current: The offet in wire of the beginning of the rdata. @type current: int @param rdlen: The length of the wire-format rdata @type rdlen: int @param origin: The origin to use for relative names @type origin: dns.name.Name @rtype: dns.rdata.Rdata instance N(���R)���(���RU���R ���R!���t���wiret���currentt���rdlenR*���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt ���from_wire%��s����c���������C���s���d�S(���sW���Convert any domain names in the rdata to the specified relativization. N(����(���R"���R*���R+���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���choose_relativity;��s����N(���t���__name__t ���__module__t���__doc__t ���__slots__R#���R'���R(���R���RF���R-���R0���R5���R8���R?���R@���RB���RE���RG���RI���RJ���RK���RL���RP���RT���R7���t���classmethodRZ���R[���(����(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyR������s2��� t���GenericRdatac�����������B���sz���e��Z�d��Z�d�g�Z�d����Z�d�e�d���Z�d�e�d���Z�e �e���Z�d�d�d���Z �d�d���Z�e �e���Z�d����Z�RS( ���s����Generate Rdata Class This class is used for rdata types for which we have no better implementation. It implements the DNS "unknown RRs" scheme. R���c���������C���s&���t��t�|����j�|�|���|�|��_�d��S(���N(���t���superRa���R#���R���(���R"���R ���R!���R���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyR#���L��s����c���������K���s���d�t��|��j���t�|��j���S(���Ns���\# %d (���R���R���R���(���R"���R*���R+���R,���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyR-���P��s����c���������C���s����|�j�����}�|�j����s(�|�j�d�k�r=�t�j�j�d�����n��|�j����}�g��}�x0�|�j�����}�|�j����rn�Pn��|�j�|�j���qR�Wd�j �|���} �| �j �d���} �t�| ���|�k�r��t�j�j�d�����n��|��|�|�| ���S(���Ns���\#s$���generic rdata does not start with \#R���R����s'���generic rdata hex data has wrong length(���t���gett ���is_identifiert���valueR$���t ���exceptiont���SyntaxErrort���get_intt ���is_eol_or_eofR���R���t���decodeR���(���RU���R ���R!���RV���R*���R+���t���tokent���lengthR���R ���R���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyR7���S��s����c���������C���s���|�j��|��j���d��S(���N(���t���writeR���(���R"���R.���R/���R*���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyR0���f��s����c���������C���s���|��|�|�|�|�|�|�!��S(���N(����(���RU���R ���R!���RW���RX���RY���R*���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyRZ���i��s����c���������C���s���t��|��j�|�j���S(���N(���RQ���R���(���R"���RA���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyRB���n��s����N( ���R\���R]���R^���R_���R#���R���RF���R-���R7���R`���R0���RZ���RB���(����(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyRa���C��s��� s���dns.rdtypesc���������C���s;��d����}�t��j�|��|�f���}�t�j�j�|����}�t�j�j�|���}�|�j�d�d���}�|�st��j�t�j�j�|�f���}�|�sy2�|�d�j�t �|�|�g�����}�|�t��|��|�f�<Wqt �k �ry8�|�d�j�t �d�|�g�����}�|�t��t�j�j�|�f�<Wqt �k �rd��}�qXqXqn��|�r1t�|�|���}�n�t �}�|�S(���Nc���������S���sC���t��|����}�|��j�d���}�x!�|�d�D]�}�t�|�|���}�q&�W|�S(���Nt���.i���(���t ���__import__t���splitt���getattr(���RN���t���modt ���componentst���comp(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt ���import_modulev��s ����t���-t���_Rn���t���ANY(���t���_rdata_modulesRc���R$���R<���R-���R%���R���Rx���R���t���_module_prefixt���ImportErrorR���Rq���Ra���(���R ���R!���Ru���Rr���t���rdclass_textt���rdtype_textRU���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���get_rdata_classt��s.���� c���������C���s����t��|�t���r$�t�j�j�|���}�n��t�|��|���}�|�t�k�r��|�j����}�|�j�|���|�j ����r��|�j �d�k�r��t�j�|��|�|�|�|���}�t�|��|�|�j �d�t�|�j ���|���Sn��|�j�|��|�|�|�|���S(���sd��Build 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 I{tok} is a string, then a tokenizer is created and the string is used as its input. @param rdclass: The rdata class @type rdclass: int @param rdtype: The rdata type @type rdtype: int @param tok: The tokenizer or input text @type tok: dns.tokenizer.Tokenizer or string @param origin: The origin to use for relative names @type origin: dns.name.Name @param relativize: Should names be relativized? @type relativize: bool @rtype: dns.rdata.Rdata instances���\#i����(���RC���R=���R$���t ���tokenizert ���TokenizerR~���Ra���Rc���t���ungetRd���Re���R7���RZ���R���R���(���R ���R!���RV���R*���R+���RU���Rk���R6���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyR7������s���� c���������C���s=���t��j�j�|���}�t�|��|���}�|�j�|��|�|�|�|�|���S(���s=��Build 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. @param rdclass: The rdata class @type rdclass: int @param rdtype: The rdata type @type rdtype: int @param wire: The wire-format message @type wire: string @param current: The offet in wire of the beginning of the rdata. @type current: int @param rdlen: The length of the wire-format rdata @type rdlen: int @param origin: The origin to use for relative names @type origin: dns.name.Name @rtype: dns.rdata.Rdata instance(���R$���t���wiredatat ���maybe_wrapR~���RZ���(���R ���R!���RW���RX���RY���R*���RU���(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyRZ������s����(���R^���R1���t ���dns.exceptionR$���t���dns.namet���dns.rdataclasst ���dns.rdatatypet ���dns.tokenizert���dns.wiredataR���R���R���R���R���RF���R���R���R���t���objectR���Ra���Ry���Rz���R~���R7���RZ���(����(����(����s/���/usr/lib64/python2.7/site-packages/dns/rdata.pyt���<module>���s.��� �. !.