
    i
                        d Z ddlmZ ddlZddlZ G d dej        j                  Z G d dej	        j
                  Zded	efd
Zded	efdZded	efdZded	efdZded	efdZej        Zej        Zej        Zej        Zej        ZdS )zDNS Opcodes.    )TypeNc                   `    e Zd ZdZdZdZdZdZed             Z	ede
e         fd            Zd	S )
Opcoder               c                     dS )N    clss    Z/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/dns/opcode.py_maximumzOpcode._maximum&   s    r    returnc                     t           S )N)UnknownOpcoder   s    r   _unknown_exception_classzOpcode._unknown_exception_class*   s    r   N)__name__
__module____qualname__QUERYIQUERYSTATUSNOTIFYUPDATEclassmethodr   r   	Exceptionr   r   r   r   r   r      sq        EFFFF  [ i    [  r   r   c                       e Zd ZdZdS )r   zAn DNS opcode is unknown.N)r   r   r   __doc__r   r   r   r   r   /   s        ####r   r   textr   c                 6    t                               |           S )zConvert text into an opcode.

    *text*, a ``str``, the textual opcode

    Raises ``dns.opcode.UnknownOpcode`` if the opcode is unknown.

    Returns an ``int``.
    )r   	from_text)r"   s    r   r$   r$   3   s     D!!!r   flagsc                 ,    t          | dz  dz	            S )zpExtract an opcode from DNS message flags.

    *flags*, an ``int``, the DNS flags.

    Returns an ``int``.
     x     )r   r%   s    r   
from_flagsr*   @   s     56>b()))r   valuec                     | dz  dz  S )zConvert an opcode to a value suitable for ORing into DNS message
    flags.

    *value*, an ``int``, the DNS opcode value.

    Returns an ``int``.
    r(   r'   r   r+   s    r   to_flagsr.   K   s     RK6!!r   c                 6    t                               |           S )zConvert an opcode to text.

    *value*, an ``int`` the opcode value,

    Raises ``dns.opcode.UnknownOpcode`` if the opcode is unknown.

    Returns a ``str``.
    )r   to_textr-   s    r   r0   r0   W   s     >>%   r   c                 <    t          |           t          j        k    S )zmIs the opcode in flags UPDATE?

    *flags*, an ``int``, the DNS message flags.

    Returns a ``bool``.
    )r*   r   r   r)   s    r   	is_updater2   d   s     e--r   )r!   typingr   dns.enumdnsdns.exceptionenumIntEnumr   	exceptionDNSExceptionr   strr$   intr*   r.   r0   boolr2   r   r   r   r   r   r   r   r   <module>r>      se  $                 SX   *$ $ $ $ $CM. $ $ $
"C 
"F 
" 
" 
" 
"*c *f * * * *	"F 	"s 	" 	" 	" 	"
!6 
!c 
! 
! 
! 
!.S .T . . . . 					r   