
    _?i
                     r   S r SSKJr  SSKrSSKr " S S\R                  R                  5      r " S S\R                  R                  5      rS\S	\4S
 jrS\S	\4S jrS\S	\4S jrS\S	\4S jrS\S	\4S jr\R(                  r\R*                  r\R,                  r\R.                  r\R0                  rg)zDNS Opcodes.    )TypeNc                   V    \ rS rSrSrSrSrSrSr\	S 5       r
\	S\\   4S	 j5       rS
rg)Opcode   r               c                     g)N    clss    N/var/www/html/livechat/backend/venv/lib/python3.13/site-packages/dns/opcode.py_maximumOpcode._maximum&   s        returnc                     [         $ )N)UnknownOpcoder   s    r   _unknown_exception_classOpcode._unknown_exception_class*   s    r   r   N)__name__
__module____qualname____firstlineno__QUERYIQUERYSTATUSNOTIFYUPDATEclassmethodr   r   	Exceptionr   __static_attributes__r   r   r   r   r      sL    EFFFF  i  r   r   c                       \ rS rSrSrSrg)r   /   zAn DNS opcode is unknown.r   N)r   r   r   r   __doc__r$   r   r   r   r   r   /   s    #r   r   textr   c                 ,    [         R                  U 5      $ )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                 $    [        U S-  S-	  5      $ )zdExtract an opcode from DNS message flags.

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

Returns an ``int``.
 x     )r   r+   s    r   
from_flagsr0   @   s     56>b())r   valuec                     U S-  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   r1   s    r   to_flagsr4   K   s     RK6!!r   c                 ,    [         R                  U 5      $ )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_textr3   s    r   r6   r6   W   s     >>%  r   c                 :    [        U 5      [        R                  :H  $ )zaIs the opcode in flags UPDATE?

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

Returns a ``bool``.
)r0   r   r!   r/   s    r   	is_updater8   d   s     e--r   )r'   typingr   dns.enumdnsdns.exceptionenumIntEnumr   	exceptionDNSExceptionr   strr*   intr0   r4   r6   boolr8   r   r   r   r    r!   r   r   r   <module>rD      s   $    SXX *$CMM.. $
"C 
"F 
"*c *f *	"F 	"s 	"
!6 
!c 
!.S .T . 					r   