U mf<@sdZddlmZddlZddlZGdddejjZGdddej j Z e edd d Z eeed d d ZeeeefdddZdeee dddZejZejZejZejZejZejZejZejZejZejZejZejZejZej Z ej!Z!ej"Z"ej#Z#ej$Z$ej%Z%ej&Z&ej'Z'dS)zDNS Result Codes.)TupleNc@sxeZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd Zd ZdZdZdZdZdZdZdZeddZeddZdS)Rcoder cCsdS)Nclsrr7/opt/hc_python/lib/python3.8/site-packages/dns/rcode.py_maximumFszRcode._maximumcCstS)N) UnknownRcoderrrr_unknown_exception_classJszRcode._unknown_exception_classN)__name__ __module__ __qualname__NOERRORFORMERRSERVFAILNXDOMAINNOTIMPREFUSEDYXDOMAINYXRRSETNXRRSETNOTAUTHNOTZONE DSOTYPENIBADVERSBADSIGBADKEYBADTIMEBADMODEBADNAMEBADALGBADTRUNC BADCOOKIE classmethodrrrrrrrs2 rc@seZdZdZdS)rzA DNS rcode is unknown.N)rr r!__doc__rrrrrOsr)textreturncCs t|S)zConvert text into an rcode. *text*, a ``str``, the textual rcode or an integer in textual form. Raises ``dns.rcode.UnknownRcode`` if the rcode mnemonic is unknown. Returns a ``dns.rcode.Rcode``. )r from_text)r9rrrr;Ss r;)flags ednsflagsr:cCs|d@|d?d@B}t|S)zReturn the rcode value encoded by flags and ednsflags. *flags*, an ``int``, the DNS flags field. *ednsflags*, an ``int``, the EDNS flags field. Raises ``ValueError`` if rcode is < 0 or > 4095 Returns a ``dns.rcode.Rcode``. r)rmake)r<r=valuerrr from_flags`s rB)rAr:cCs4|dks|dkrtd|d@}|d@d>}||fS)zReturn a (flags, ednsflags) tuple which encodes the rcode. *value*, a ``dns.rcode.Rcode``, the rcode. Raises ``ValueError`` if rcode is < 0 or > 4095. Returns an ``(int, int)`` tuple. rrzrcode must be >= 0 and <= 4095r>r?r) ValueError)rAvZevrrrto_flagsps  rEF)rAtsigr:cCs|r|tjkrdSt|S)zConvert rcode into text. *value*, a ``dns.rcode.Rcode``, the rcode. Raises ``ValueError`` if rcode is < 0 or > 4095. Returns a ``str``. r/)rr.to_text)rArFrrrrGs rG)F)(r8typingrZdns.enumZdnsZ dns.exceptionenumIntEnumr exceptionZ DNSExceptionrstrr;intrBrEboolrGr"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6rrrrs< 5