HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib64/python3.10/site-packages/dns/__pycache__/opcode.cpython-310.pyc
o

!we�
�@s�dZddlZddlZGdd�dejj�ZGdd�dejj�Z	de
defd	d
�Zdedefdd
�Z
dedefdd�Zdede
fdd�Zdedefdd�ZejZejZejZejZejZdS)zDNS Opcodes.�Nc@s8eZdZdZdZdZdZdZedd��Z	edd	��Z
d
S)�Opcoder����cCsdS)N����clsrr�C/home/arjun/projects/env/lib/python3.10/site-packages/dns/opcode.py�_maximum$�zOpcode._maximumcCstS)N)�
UnknownOpcoder	rrr�_unknown_exception_class(r
zOpcode._unknown_exception_classN)�__name__�
__module__�__qualname__�QUERY�IQUERY�STATUS�NOTIFY�UPDATE�classmethodrrrrrrrs
rc@seZdZdZdS)rzAn DNS opcode is unknown.N)rrr�__doc__rrrrr-sr�text�returncC�
t�|�S)z�Convert 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)rrrrr1�

r�flagscCst|d@d?�S)zpExtract an opcode from DNS message flags.

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

    Returns an ``int``.
    �x�)r�rrrr�
from_flags>sr#�valuecCs|d>d@S)z�Convert 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$rrr�to_flagsIs	r&cCr)z�Convert 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%rrrr'Urr'cCst|�tjkS)zmIs the opcode in flags UPDATE?

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

    Returns a ``bool``.
    )r#rrr"rrr�	is_updatebsr()r�dns.enum�dns�
dns.exception�enum�IntEnumr�	exception�DNSExceptionr�strr�intr#r&r'�boolr(rrrrrrrrr�<module>s