a
àMÒeª
ã @ s® d Z ddlZddlZG dd„ dejjƒZG dd„ dejjƒZ e
edœdd „Zeed
œdd„Z
eed
œdd„Zee
d
œdd„Zeed
œdd„ZejZejZejZejZejZdS )zDNS Opcodes.é Nc @ s8 e Zd ZdZdZdZdZdZedd„ ƒZ edd „ ƒZ
d
S )ÚOpcoder é é é é c C s dS )Né © ©Úclsr r ú./usr/lib/python3.9/site-packages/dns/opcode.pyÚ_maximum$ s zOpcode._maximumc C s t S )N)Ú
UnknownOpcoder r r r Ú_unknown_exception_class( s zOpcode._unknown_exception_classN)Ú__name__Ú
__module__Ú__qualname__ÚQUERYÚIQUERYÚSTATUSÚNOTIFYÚUPDATEÚclassmethodr r r r r r r s
r c @ s e Zd ZdZdS )r
zAn DNS opcode is unknown.N)r r r Ú__doc__r r r r r
- s r
)ÚtextÚreturnc C s
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)r r r r r 1 s
r )Úflagsr c C s t | d@ d? ƒS )zpExtract an opcode from DNS message flags.
*flags*, an ``int``, the DNS flags.
Returns an ``int``.
é x é )r ©r r r r Ú
from_flags> s r )Úvaluer c C s | 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! r r r Úto_flagsI s r# c C s
t | ¡S )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" r r r r$ U s
r$ c C s t | ƒtjkS )zmIs the opcode in flags UPDATE?
*flags*, an ``int``, the DNS message flags.
Returns a ``bool``.
)r r r r r r r Ú is_updateb s r% )r Zdns.enumZdnsZ
dns.exceptionÚenumÚIntEnumr Ú exceptionZDNSExceptionr
Ústrr Úintr r# r$ Úboolr% r r r r r r r r r Ú