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

Module dns.name

DNS Names.
Classes
Name A DNS name.

Exceptions
AbsoluteConcatenation Raised if an attempt is made to append anything other than the empty name to an absolute name.
BadEscape Raised if an escaped code in a text format name is invalid.
BadLabelType Raised if the label type of a wire format name is unknown.
BadPointer Raised if a compression pointer points forward instead of backward.
EmptyLabel Raised if a label is empty.
LabelTooLong Raised if a label is > 63 octets long.
NameTooLong Raised if a name is > 255 octets long.
NeedAbsoluteNameOrOrigin Raised if an attempt is made to convert a non-absolute name to wire when there is also a non-absolute (or missing) origin.

Function Summary
dns.name.Name object from_text(text, origin)
Convert text into a Name object.
(dns.name.Name object, int) tuple from_wire(message, current)
Convert possibly compressed wire format into a Name.

Variable Summary
dns.name.Name object empty - The empty DNS name.
int NAMERELN_COMMONANCESTOR
int NAMERELN_EQUAL
int NAMERELN_NONE
int NAMERELN_SUBDOMAIN
int NAMERELN_SUPERDOMAIN
dns.name.Name object root - The DNS root name.

Function Details

from_text(text, origin=<DNS name .>)

Convert text into a Name object.
Returns:
dns.name.Name object

from_wire(message, current)

Convert possibly compressed wire format into a Name.
Parameters:
message - the entire DNS message
           (type=string)
current - the offset of the beginning of the name from the start of the message
           (type=int)
Returns:
a tuple consisting of the name that was read and the number of bytes of the wire format message which were consumed reading it
           (type=(dns.name.Name object, int) tuple)
Raises:
dns.name.BadPointer - a compression pointer did not point backwards in the message
dns.name.BadLabelType - an invalid label type was encountered.

Variable Details

empty

The empty DNS name.
Type:
dns.name.Name object
Value:
<DNS name @>                                                           

NAMERELN_COMMONANCESTOR

Type:
int
Value:
4                                                                      

NAMERELN_EQUAL

Type:
int
Value:
3                                                                      

NAMERELN_NONE

Type:
int
Value:
0                                                                      

NAMERELN_SUBDOMAIN

Type:
int
Value:
2                                                                      

NAMERELN_SUPERDOMAIN

Type:
int
Value:
1                                                                      

root

The DNS root name.
Type:
dns.name.Name object
Value:
<DNS name .>                                                           

Generated by Epydoc 1.1 on Fri Nov 7 14:49:26 2003 http://epydoc.sf.net