Package dns :: Module rcode
[show private | hide private]
[frames | no frames]

Module dns.rcode

DNS Result Codes.
Exceptions
UnknownRcode Raised if an rcode is unknown.

Function Summary
int from_flags(flags, ednsflags)
Return the rcode value encoded by flags and ednsflags.
int from_text(text)
Convert text into an rcode.
(int, int) tuple to_flags(value)
Return a (flags, ednsflags) tuple which encodes the rcode.
string to_text(value)
Convert rcode into text.

Variable Summary
int BADVERS
int FORMERR
int NOERROR
int NOTAUTH
int NOTIMP
int NOTZONE
int NXDOMAIN
int NXRRSET
int REFUSED
int SERVFAIL
str x
int y
int YXDOMAIN
int YXRRSET
dict _by_text
dict _by_value

Function Details

from_flags(flags, ednsflags)

Return the rcode value encoded by flags and ednsflags.
Parameters:
flags - the DNS flags
           (type=int)
ednsflags - the EDNS flags
           (type=int)
Returns:
int
Raises:
ValueError - rcode is < 0 or > 4095

from_text(text)

Convert text into an rcode.
Parameters:
text - the texual rcode
           (type=string)
Returns:
int
Raises:
UnknownRcode - the rcode is unknown

to_flags(value)

Return a (flags, ednsflags) tuple which encodes the rcode.
Parameters:
value - the rcode
           (type=int)
Returns:
(int, int) tuple
Raises:
ValueError - rcode is < 0 or > 4095

to_text(value)

Convert rcode into text.
Parameters:
value - the rcode
           (type=int)
Returns:
string

Variable Details

BADVERS

Type:
int
Value:
16                                                                     

FORMERR

Type:
int
Value:
1                                                                      

NOERROR

Type:
int
Value:
0                                                                      

NOTAUTH

Type:
int
Value:
9                                                                      

NOTIMP

Type:
int
Value:
4                                                                      

NOTZONE

Type:
int
Value:
10                                                                     

NXDOMAIN

Type:
int
Value:
3                                                                      

NXRRSET

Type:
int
Value:
8                                                                      

REFUSED

Type:
int
Value:
5                                                                      

SERVFAIL

Type:
int
Value:
2                                                                      

x

Type:
str
Value:
'NOTAUTH'                                                              

y

Type:
int
Value:
9                                                                      

YXDOMAIN

Type:
int
Value:
6                                                                      

YXRRSET

Type:
int
Value:
7                                                                      

_by_text

Type:
dict
Value:
{'BADVERS': 16,
 'FORMERR': 1,
 'NOERROR': 0,
 'NOTAUTH': 9,
 'NOTIMP': 4,
 'NOTZONE': 10,
 'NXDOMAIN': 3,
 'NXRRSET': 8,
...                                                                    

_by_value

Type:
dict
Value:
{0: 'NOERROR',
 1: 'FORMERR',
 2: 'SERVFAIL',
 3: 'NXDOMAIN',
 4: 'NOTIMP',
 5: 'REFUSED',
 6: 'YXDOMAIN',
 7: 'YXRRSET',
...                                                                    

Generated by Epydoc 1.1 on Sun Aug 10 21:36:17 2003 http://epydoc.sf.net