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 = 255                                                                   
int CH = 3                                                                     
int HS = 4                                                                     
int IN = 1                                                                     
int NONE = 254                                                                   
int RESERVED0 = 0                                                                     
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.

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                                                                     

_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: True, 255: True}                                                 

Generated by Epydoc 2.1 on Thu Apr 1 12:10:11 2004 http://epydoc.sf.net