
    g
                     f   S 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\R,                  rg)zDNS Opcodes.    Nc                   H    \ rS rSrSrSrSrSrSr\	S 5       r
\	S 5       rS	rg
)Opcode   r               c                     g)N    clss    C/home/matz/Project1/venv/lib/python3.13/site-packages/dns/opcode.py_maximumOpcode._maximum$   s        c                     [         $ )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   __static_attributes__r   r   r   r   r      sA    EFFFF   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   textreturnc                 ,    [         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(   1   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_flagsr.   >   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   r/   s    r   to_flagsr2   I   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_textr1   s    r   r4   r4   U   s     >>%  r   c                 :    [        U 5      [        R                  :H  $ )zaIs the opcode in flags UPDATE?

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

Returns a ``bool``.
)r.   r   r   r-   s    r   	is_updater6   b   s     e--r   )r$   dns.enumdnsdns.exceptionenumIntEnumr   	exceptionDNSExceptionr   strr(   intr.   r2   r4   boolr6   r   r   r   r   r   r   r   r   <module>rA      s   $   SXX *$CMM.. $
"C 
"F 
"*c *f *	"F 	"s 	"
!6 
!c 
!.S .T . 					r   