o
    ‚±h¨  ã                   @   s¸   d Z ddlZddlZG dd„ dejjƒZejejhZ	G dd„ dej
jƒZdedefd	d
„Zdedefdd„Zdedefdd„ZejZejZejZejZejZejZejZejZejZdS )zDNS Rdata Classes.é    Nc                   @   sd   e Zd ZdZdZdZeZdZeZdZ	e	Z
dZdZedd	„ ƒZed
d„ ƒZedd„ ƒZedd„ ƒZdS )Ú
RdataClasszDNS Rdata Classr   é   é   é   éþ   éÿ   c                 C   ó   dS )Niÿÿ  © ©Úclsr	   r	   úF/var/www/vip_panel/venv/lib/python3.10/site-packages/dns/rdataclass.pyÚ_maximum%   ó   zRdataClass._maximumc                 C   r   )NÚclassr	   r
   r	   r	   r   Ú_short_name)   r   zRdataClass._short_namec                 C   r   )NÚCLASSr	   r
   r	   r	   r   Ú_prefix-   r   zRdataClass._prefixc                 C   s   t S )N)ÚUnknownRdataclassr
   r	   r	   r   Ú_unknown_exception_class1   r   z#RdataClass._unknown_exception_classN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	RESERVED0ÚINÚINTERNETÚCHÚCHAOSÚHSÚHESIODÚNONEÚANYÚclassmethodr   r   r   r   r	   r	   r	   r   r      s&    


r   c                   @   s   e Zd ZdZdS )r   zA DNS class is unknown.N)r   r   r   r   r	   r	   r	   r   r   9   s    r   ÚtextÚreturnc                 C   ó
   t  | ¡S )a¦  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 a ``dns.rdataclass.RdataClass``.
    )r   Ú	from_text)r#   r	   r	   r   r&   =   s   
r&   Úvaluec                 C   r%   )a  Convert a DNS rdata class 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   Úto_text)r'   r	   r	   r   r(   O   s   
r(   Úrdclassc                 C   s   | t v rdS dS )zœTrue if the specified class is a metaclass.

    The currently defined metaclasses are ANY and NONE.

    *rdclass* is a ``dns.rdataclass.RdataClass``.
    TF)Ú_metaclasses)r)   r	   r	   r   Úis_metaclass]   s   r+   )r   Údns.enumÚdnsÚdns.exceptionÚenumÚIntEnumr   r    r!   r*   Ú	exceptionÚDNSExceptionr   Ústrr&   r(   Úboolr+   r   r   r   r   r   r   r   r	   r	   r	   r   Ú<module>   s$   
