
                         X   S r SSKrSSKrSrSrSrSrSrSr	\\\\\\	S.r
\
R                  5        V Vs0 s H  u  pX_M	     snn r\
R                  \\\S	.5        \S
\	S
0r\R                  " S\R                   5      r " S S\R$                  R&                  5      rS rS rS rgs  snn f )zDNS Rdata Classes.    N               )	RESERVED0INCHHSNONEANY)INTERNETCHAOSHESIODTzCLASS([0-9]+)$c                       \ rS rSrSrSrg)UnknownRdataclass?   zA DNS class is unknown. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       !lib/third_party/dns/rdataclass.pyr   r   ?   s    !r   r   c                     [         R                  U R                  5       5      nUcO  [        R	                  U 5      nUc  [
        e[        UR                  S5      5      nUS:  d  US:  a  [        S5      eU$ )au  Convert text into a DNS rdata class value.

The input text can be a defined DNS RR class mnemonic or
instance of the DNS generic class syntax.

For example, "IN" and "CLASS1" will both result in a value of 1.

Raises ``dns.rdatatype.UnknownRdataclass`` if the class is unknown.

Raises ``ValueError`` if the rdata class value is not >= 0 and <= 65535.

Returns an ``int``.
r   r     'class must be between >= 0 and <= 65535)	_by_textgetupper_unknown_class_patternmatchr   intgroup
ValueError)textvaluer$   s      r   	from_textr*   C   sh     LL&E}&,,T2=##EKKN#19FGGLr   c                     U S:  d  U S:  a  [        S5      e[        R                  U 5      nUc  S[        U 5      -   nU$ )zConvert a DNS rdata type value to text.

If the value has a known mnemonic, it will be used, otherwise the
DNS generic class syntax will be used.

Raises ``ValueError`` if the rdata class value is not >= 0 and <= 65535.

Returns a ``str``.
r   r   r   CLASS)r'   	_by_valuer!   repr)r)   r(   s     r   to_textr/   ]   sC     qyEEMBCC==D|e$Kr   c                     U [         ;   a  gg)z{True if the specified class is a metaclass.

The currently defined metaclasses are ANY and NONE.

*rdclass* is an ``int``.
TF)_metaclasses)rdclasss    r   is_metaclassr3   p   s     ,r   )r   redns.exceptiondnsr   r	   r
   r   r   r   r    itemsr-   updater1   compileIr#   	exceptionDNSExceptionr   r*   r/   r3   )xys   00r   <module>r?      s   $  	 	
	 


 'nn./.daQT./	
 	  	$
 $4bdd; "22 "4&
I 0s   B&