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

Module dns.rdatatype

DNS Rdata Types.
Exceptions
UnknownRdatatype Raised if a type is unknown.

Function Summary
int from_text(text)
Convert text into a DNS rdata type value.
bool is_metatype(rdtype)
True if the type is a metatype.
bool is_singleton(rdtype)
True if the type is a singleton.
string to_text(value)
Convert a DNS rdata type to text.

Variable Summary
int A = 1                                                                     
int A6 = 38                                                                    
int AAAA = 28                                                                    
int AFSDB = 18                                                                    
int ANY = 255                                                                   
int APL = 42                                                                    
int AXFR = 252                                                                   
int CERT = 37                                                                    
int CNAME = 5                                                                     
int DNAME = 39                                                                    
int DNSKEY = 48                                                                    
int DS = 43                                                                    
int GPOS = 27                                                                    
int HINFO = 13                                                                    
int ISDN = 20                                                                    
int IXFR = 251                                                                   
int KEY = 25                                                                    
int KX = 36                                                                    
int LOC = 29                                                                    
int MAILA = 254                                                                   
int MAILB = 253                                                                   
int MB = 7                                                                     
int MD = 3                                                                     
int MF = 4                                                                     
int MG = 8                                                                     
int MINFO = 14                                                                    
int MR = 9                                                                     
int MX = 15                                                                    
int NAPTR = 35                                                                    
int NONE = 0                                                                     
int NS = 2                                                                     
int NSAP = 22                                                                    
int NSAP_PTR = 23                                                                    
int NSEC = 47                                                                    
int NULL = 10                                                                    
int NXT = 30                                                                    
int OPT = 41                                                                    
int PTR = 12                                                                    
int PX = 26                                                                    
int RP = 17                                                                    
int RRSIG = 46                                                                    
int RT = 21                                                                    
int SIG = 24                                                                    
int SOA = 6                                                                     
int SRV = 33                                                                    
int TKEY = 249                                                                   
int TSIG = 250                                                                   
int TXT = 16                                                                    
int UNSPEC = 103                                                                   
int WKS = 11                                                                    
int X25 = 19                                                                    
dict _by_text: The rdata type textual name to value mapping
dict _by_value: The rdata type value to textual name mapping
dict _metatypes: If an rdatatype is a metatype, there will be a mapping whose key is the rdatatype value and whose value is True in this dictionary.
dict _singletons: If an rdatatype is a singleton, 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 type value.
Parameters:
text - the text
           (type=string)
Returns:
int
Raises:
dns.rdatatype.UnknownRdatatype - the type is unknown
ValueError - the rdata type value is not >= 0 and <= 65535

is_metatype(rdtype)

True if the type is a metatype.
Parameters:
rdtype - the type
           (type=int)
Returns:
bool

is_singleton(rdtype)

True if the type is a singleton.
Parameters:
rdtype - the type
           (type=int)
Returns:
bool

to_text(value)

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

Variable Details

A

Type:
int
Value:
1                                                                     

A6

Type:
int
Value:
38                                                                    

AAAA

Type:
int
Value:
28                                                                    

AFSDB

Type:
int
Value:
18                                                                    

ANY

Type:
int
Value:
255                                                                   

APL

Type:
int
Value:
42                                                                    

AXFR

Type:
int
Value:
252                                                                   

CERT

Type:
int
Value:
37                                                                    

CNAME

Type:
int
Value:
5                                                                     

DNAME

Type:
int
Value:
39                                                                    

DNSKEY

Type:
int
Value:
48                                                                    

DS

Type:
int
Value:
43                                                                    

GPOS

Type:
int
Value:
27                                                                    

HINFO

Type:
int
Value:
13                                                                    

ISDN

Type:
int
Value:
20                                                                    

IXFR

Type:
int
Value:
251                                                                   

KEY

Type:
int
Value:
25                                                                    

KX

Type:
int
Value:
36                                                                    

LOC

Type:
int
Value:
29                                                                    

MAILA

Type:
int
Value:
254                                                                   

MAILB

Type:
int
Value:
253                                                                   

MB

Type:
int
Value:
7                                                                     

MD

Type:
int
Value:
3                                                                     

MF

Type:
int
Value:
4                                                                     

MG

Type:
int
Value:
8                                                                     

MINFO

Type:
int
Value:
14                                                                    

MR

Type:
int
Value:
9                                                                     

MX

Type:
int
Value:
15                                                                    

NAPTR

Type:
int
Value:
35                                                                    

NONE

Type:
int
Value:
0                                                                     

NS

Type:
int
Value:
2                                                                     

NSAP

Type:
int
Value:
22                                                                    

NSAP_PTR

Type:
int
Value:
23                                                                    

NSEC

Type:
int
Value:
47                                                                    

NULL

Type:
int
Value:
10                                                                    

NXT

Type:
int
Value:
30                                                                    

OPT

Type:
int
Value:
41                                                                    

PTR

Type:
int
Value:
12                                                                    

PX

Type:
int
Value:
26                                                                    

RP

Type:
int
Value:
17                                                                    

RRSIG

Type:
int
Value:
46                                                                    

RT

Type:
int
Value:
21                                                                    

SIG

Type:
int
Value:
24                                                                    

SOA

Type:
int
Value:
6                                                                     

SRV

Type:
int
Value:
33                                                                    

TKEY

Type:
int
Value:
249                                                                   

TSIG

Type:
int
Value:
250                                                                   

TXT

Type:
int
Value:
16                                                                    

UNSPEC

Type:
int
Value:
103                                                                   

WKS

Type:
int
Value:
11                                                                    

X25

Type:
int
Value:
19                                                                    

_by_text

The rdata type textual name to value mapping
Type:
dict
Value:
{'A': 1,
 'A6': 38,
 'AAAA': 28,
 'AFSDB': 18,
 'ANY': 255,
 'APL': 42,
 'AXFR': 252,
 'CERT': 37,
...                                                                    

_by_value

The rdata type value to textual name mapping
Type:
dict
Value:
{0: 'NONE',
 1: 'A',
 2: 'NS',
 3: 'MD',
 4: 'MF',
 5: 'CNAME',
 6: 'SOA',
 7: 'MB',
...                                                                    

_metatypes

If an rdatatype is a metatype, there will be a mapping whose key is the rdatatype value and whose value is True in this dictionary.
Type:
dict
Value:
{41: True}                                                             

_singletons

If an rdatatype is a singleton, there will be a mapping whose key is the rdatatype value and whose value is True in this dictionary.
Type:
dict
Value:
{30: True, 6: True, 39: True}                                          

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