o
    2³cA  ã                   @   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d„ Zd	d
„ Z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	   úD/var/www/html/gps/gps/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_class/   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   7   s    r   c                 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 an ``int``.
    )r   Ú	from_text)Útextr	   r	   r   r$   ;   s   
r$   c                 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)Úvaluer	   r	   r   r&   M   s   
r&   c                 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 an ``int``.
    TF)Ú_metaclasses)Úrdclassr	   r	   r   Úis_metaclass[   s   r*   )r   Údns.enumÚdnsÚdns.exceptionÚenumÚIntEnumr   r    r!   r(   Ú	exceptionÚDNSExceptionr   r$   r&   r*   r   r   r   r   r   r   r   r	   r	   r	   r   Ú<module>   s$   
