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

Module dns.rdataclass

DNS Rdata Classes.
Exceptions
UnknownRdataclass Raised when a class is unknown.

Function Summary
int from_text(text)
Convert text into a DNS rdata class value.
bool is_metaclass(rdclass)
True if the class is a metaclass.
string to_text(value)
Convert a DNS rdata class to text.

Variable Summary
int ANY
int CH
int HS
int IN
int NONE
int RESERVED0
str x
int y
dict _by_text - The rdata class textual name to value mapping
dict _by_value - The rdata class value to textual name mapping
dict _metaclasses - If an rdataclass is a metaclass, there will be a mapping whose key is the rdatatype value and whose value is True in this dictionary.
SRE_Pattern _unknown_class_pattern

Function Details

from_text(text)

Convert text into a DNS rdata class value.
Parameters:
text - the text
           (type=string)
Returns:
int
Raises:
dns.rdataclass.UnknownRdataClass - the class is unknown
ValueError - the rdata class value is not >= 0 and <= 65535

is_metaclass(rdclass)

True if the class is a metaclass.
Parameters:
rdclass - the rdata class
           (type=int)
Returns:
bool

to_text(value)

Convert a DNS rdata class to text.
Parameters:
value - the rdata class value
           (type=int)
Returns:
string
Raises:
ValueError - the rdata class value is not >= 0 and <= 65535

Variable Details

ANY

Type:
int
Value:
255                                                                    

CH

Type:
int
Value:
3                                                                      

HS

Type:
int
Value:
4                                                                      

IN

Type:
int
Value:
1                                                                      

NONE

Type:
int
Value:
254                                                                    

RESERVED0

Type:
int
Value:
0                                                                      

x

Type:
str
Value:
'RESERVED0'                                                            

y

Type:
int
Value:
0                                                                      

_by_text

The rdata class textual name to value mapping
Type:
dict
Value:
{'ANY': 255,
 'CH': 3,
 'CHAOS': 3,
 'HESIOD': 4,
 'HS': 4,
 'IN': 1,
 'INTERNET': 1,
 'NONE': 254,
...                                                                    

_by_value

The rdata class value to textual name mapping
Type:
dict
Value:
{0: 'RESERVED0', 1: 'IN', 3: 'CH', 4: 'HS', 254: 'NONE', 255: 'ANY'}   

_metaclasses

If an rdataclass is a metaclass, there will be a mapping whose key is the rdatatype value and whose value is True in this dictionary.
Type:
dict
Value:
{254: 1, 255: 1}                                                       

_unknown_class_pattern

Type:
SRE_Pattern
Value:
CLASS([0-9]+)$                                                         

Generated by Epydoc 1.1 on Sat Aug 2 15:09:37 2003 http://epydoc.sf.net