Home | Trees | Index | Help |
|
---|
Package dns :: Module name :: Class Name |
|
object
--+
|
Name
A DNS name.
The dns.name.Name class represents a DNS name as a tuple of labels. Instances of the class are immutable.Method Summary | |
---|---|
Initialize a domain name from a list of labels. | |
__add__(self,
other)
| |
__eq__(self,
other)
| |
__ge__(self,
other)
| |
__getitem__(self,
index)
| |
__getslice__(self,
start,
stop)
| |
__getstate__(...)
| |
__gt__(self,
other)
| |
int |
Return a case-insensitive hash of the name. |
__le__(self,
other)
| |
int |
The length of the name (in labels). |
__lt__(self,
other)
| |
__ne__(self,
other)
| |
a new object with type S, a subtype of T |
|
__repr__(self)
| |
__setattr__(self,
name,
value)
| |
__str__(self)
| |
__sub__(self,
other)
| |
dns.name.Name object |
Return a name which is equal to the current name, but is in DNSSEC canonical form. |
dns.name.Name object |
Return a name with the relativity desired by the caller. |
dns.name.Name object |
Return a new name which is the concatenation of self and other. |
dns.name.Name object |
If self is a relative name, return a new name which is the concatenation of self and origin. |
Compare two names, returning a 3-tuple (relation, order, nlabels). | |
bool |
Is the most significant label of this name the root label? |
bool |
Is self a subdomain of other? |
bool |
Is self a superdomain of other? |
bool |
Is this name wild? (I.e. |
dns.name.Name object |
If self is a subdomain of origin, return a new name which is self relative to origin. |
tuple |
Split a name into a prefix and suffix at depth. |
string |
Convert name to a format suitable for digesting in hashes. |
string |
Convert name to text format. |
Convert name to wire format, possibly compressing it. |
Instance Variable Summary | |
---|---|
labels
- The tuple of labels in the name. |
Class Variable Summary | |
---|---|
list |
__slots__
|
member_descriptor |
labels
|
Method Details |
---|
__init__(self,
labels)
Initialize a domain name from a list of labels.
|
__hash__(self)
Return a case-insensitive hash of the name.
|
__len__(self)
The length of the name (in labels).
|
__new__(S, ...)
|
canonicalize(self)Return a name which is equal to the current name, but is in DNSSEC canonical form.
|
choose_relativity(self, origin=None, relativize=1)Return a name with the relativity desired by the caller. If origin is None, then self is returned. Otherwise, if relativize is true the name is relativized, and if relativize is false the name is derelativized.
|
concatenate(self, other)Return a new name which is the concatenation of self and other.
|
derelativize(self, origin)If self is a relative name, return a new name which is the concatenation of self and origin. Otherwise return self.
|
fullcompare(self, other)Compare two names, returning a 3-tuple (relation, order, nlabels). relation describes the relation ship beween the names, and is one of: dns.name.NAMERELN_NONE, dns.name.NAMERELN_SUPERDOMAIN, dns.name.NAMERELN_SUBDOMAIN, dns.name.NAMERELN_EQUAL, or dns.name.NAMERELN_COMMONANCESTOR order is < 0 if self < other, > 0 if self > other, and == 0 if self == other. A relative name is always less than an absolute name. If both names have the same relativity, then the DNSSEC order relation is used to order them. nlabels is the number of significant labels that the two names have in common. |
is_absolute(self)Is the most significant label of this name the root label?
|
is_subdomain(self, other)Is self a subdomain of other? The notion of subdomain includes equality.
|
is_superdomain(self, other)Is self a superdomain of other? The notion of subdomain includes equality.
|
is_wild(self)Is this name wild? (I.e. Is the least significant label '*'?)
|
relativize(self, origin)If self is a subdomain of origin, return a new name which is self relative to origin. Otherwise return self.
|
split(self, depth)Split a name into a prefix and suffix at depth.
|
to_digestable(self, origin=None)Convert name to a format suitable for digesting in hashes. The name is canonicalized and converted to uncompressed wire format.
|
to_text(self, omit_final_dot=0)Convert name to text format.
|
to_wire(self, file, compress=None, origin=None)Convert name to wire format, possibly compressing it.
|
Instance Variable Details |
---|
labelsThe tuple of labels in the name. Each label is a string of up to 63 octets. |
Class Variable Details |
---|
__slots__
|
labels
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 1.1 on Sun Aug 10 21:36:17 2003 | http://epydoc.sf.net |