
    ,h
                     \   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y)zDNS Opcodes.    Nc                   @    e Zd ZdZdZdZdZdZed        Z	ed        Z
y)	Opcoder               c                      y)N    clss    L/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/dns/opcode.py_maximumzOpcode._maximum$   s        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y)r   zAn DNS opcode is unknown.N)r   r   r   __doc__r   r   r   r   r   -   s    #r   r   textreturnc                 ,    t         j                  |       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                 ,    t         j                  |       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;      s   $   SXX *$CMM.. $
"C 
"F 
"*c *f *	"F 	"s 	"
!6 
!c 
!.S .T . 					r   