
    Eqg
                        d 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.    Nc                   N    e Zd ZdZdZdZdZdZed             Z	ed             Z
dS )	Opcoder               c                     dS )N    clss    </var/www/html/env/lib/python3.11/site-packages/dns/opcode.py_maximumzOpcode._maximum$   s    r    c                     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   r   r   r   r   r      sa        EFFFF  [   [  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   textreturnc                 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"   1   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,   I   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   r.   r.   U   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_updater0   b   s     e--r   )r   dns.enumdnsdns.exceptionenumIntEnumr   	exceptionDNSExceptionr   strr"   intr(   r,   r.   boolr0   r   r   r   r   r   r   r   r   <module>r;      sS  $           SX   *$ $ $ $ $CM. $ $ $
"C 
"F 
" 
" 
" 
"*c *f * * * *	"F 	"s 	" 	" 	" 	"
!6 
!c 
! 
! 
! 
!.S .T . . . . 					r   