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
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.
int NONE
int RESERVED0
dict _by_text - The rdata class textual name to value mapping
dict _by_value - The rdata class value to textual name mapping
SRE_Pattern _unknown_class_pattern

Function Details

from_text(text)

Convert text into a DNS rdata class value.
Returns:
int

is_metaclass(rdclass)

True if the class is a metaclass.
Returns:
bool

to_text(value)

Convert a DNS rdata class to text.
Returns:
string

Variable Details

ANY

Type:
int
Value:
255                                                                    

CH

Type:
int
Value:
3                                                                      

HS

Type:
int
Value:
4                                                                      

IN

Type:
int
Value:
1                                                                      

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}                                                 

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'}   

_unknown_class_pattern

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

Generated by Epydoc 1.1 on Sat Jun 21 20:52:30 2003 http://epydoc.sf.net