File: //proc/self/root/proc/3/root/usr/lib/python2.4/site-packages/dns/rcode.pyc
mò
!`Nc @ sF d Z d k Z d Z d Z d Z d Z d Z d Z d Z d Z
d
Z d Z d Z
d
Z h d e <d e <d e <d e <d e <d e <d e <d e
<d e <d e <d e
<d e <Z e g Z e i ƒ D] \ Z Z e e e f qİ [ ƒ Z d e i i f d „ ƒ YZ d „ Z d „ Z d „ Z d „ Z d S( s DNS Result Codes.Ni i i i i i i i i i i
i t NOERRORt FORMERRt SERVFAILt NXDOMAINt NOTIMPt REFUSEDt YXDOMAINt YXRRSETt NXRRSETt NOTAUTHt NOTZONEt BADVERSt UnknownRcodec B s t Z d Z RS( s Raised if an rcode is unknown.( t __name__t
__module__t __doc__( ( ( t- /usr/lib/python2.4/site-packages/dns/rcode.pyR 7 s c C so | i ƒ o2 t | ƒ } | d j o | d j o | Sq? n t i | i ƒ ƒ } | d j o
t ‚ n | S( s™ Convert text into an rcode.
@param text: the texual rcode
@type text: string
@raises UnknownRcode: the rcode is unknown
@rtype: int
i iÿ N( t textt isdigitt intt vt _by_textt gett uppert NoneR ( R R ( ( R t from_text; s
c C sD | d @| d ?d @B} | d j p
| d j o t d ƒ ‚ n | S( sî Return the rcode value encoded by flags and ednsflags.
@param flags: the DNS flags
@type flags: int
@param ednsflags: the EDNS flags
@type ednsflags: int
@raises ValueError: rcode is < 0 or > 4095
@rtype: int
i i iğ i iÿ s rcode must be >= 0 and <= 4095N( t flagst ednsflagst valuet
ValueError( R R R ( ( R t
from_flagsM s
c C sR | d j p
| d j o t d ƒ ‚ n | d @} t | d @ƒ d >} | | f S( s½ Return a (flags, ednsflags) tuple which encodes the rcode.
@param value: the rcode
@type value: int
@raises ValueError: rcode is < 0 or > 4095
@rtype: (int, int) tuple
i iÿ s rcode must be >= 0 and <= 4095i iğ i N( R R R t longt ev( R R R ( ( R t to_flags] s
c C s0 t i | ƒ } | d j o t | ƒ } n | S( sb Convert rcode into text.
@param value: the rcode
@type value: int
@rtype: string
N( t _by_valueR R R R t str( R R ( ( R t to_textl s
( R t
dns.exceptiont dnsR R R R R R R R R R R
R R t dictt _[1]t iteritemst xt yR"