U mf @sdZddlZddlZGdddejjZGdddejjZ e eddd Z e ed d d Z ee d ddZee d ddZe ed ddZejZejZejZejZejZdS)z DNS Opcodes.Nc@s8eZdZdZdZdZdZdZeddZ edd Z d S) OpcodercCsdS)Nclsrr8/opt/hc_python/lib/python3.8/site-packages/dns/opcode.py_maximum$szOpcode._maximumcCstS)N) UnknownOpcoder rrr _unknown_exception_class(szOpcode._unknown_exception_classN) __name__ __module__ __qualname__QUERYIQUERYSTATUSNOTIFYUPDATE classmethodr rrrrr rs rc@seZdZdZdS)r zAn DNS opcode is unknown.N)rrr__doc__rrrr r -sr )textreturncCs t|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)rrrr r1s r)flagsrcCst|d@d?S)zpExtract an opcode from DNS message flags. *flags*, an ``int``, the DNS flags. Returns an ``int``. x )rrrrr from_flags>sr )valuercCs |d>d@S)zConvert an opcode to a value suitable for ORing into DNS message flags. *value*, an ``int``, the DNS opcode value. Returns an ``int``. rrrr!rrr to_flagsIs r#cCs t|S)zConvert an opcode to text. *value*, an ``int`` the opcode value, Raises ``dns.opcode.UnknownOpcode`` if the opcode is unknown. Returns a ``str``. )rto_textr"rrr r$Us r$cCst|tjkS)zmIs the opcode in flags UPDATE? *flags*, an ``int``, the DNS message flags. Returns a ``bool``. )r rrrrrr is_updatebsr%)rZdns.enumZdnsZ dns.exceptionenumIntEnumr exceptionZ DNSExceptionr strrintr r#r$boolr%rrrrrrrrr s