Package dns :: Module rdata :: Class Rdata
[show private | hide private]
[frames | no frames]

Class Rdata

object --+
         |
        Rdata

Known Subclasses:
GenericRdata, MXBase, NSBase, CERT, DS, GPOS, HINFO, ISDN, KEY, LOC, NXT, RP, SIG, SOA, TXT, X25, AAAA, APL, A, NAPTR, NSAP, PX, SRV, WKS

Base class for all DNS rdata types.
Method Summary
  __init__(self, rdclass, rdtype)
Initialize an rdata.
  __eq__(self, other)
  __ge__(self, other)
  __gt__(self, other)
  __le__(self, other)
  __lt__(self, other)
  __ne__(self, other)
a new object with type S, a subtype of T __new__(S, ...)
  __repr__(self)
  __str__(self)
  choose_relativity(self, origin, relativize)
Convert any domain names in the rdata to the specified relativization.
int covers(self)
DNS SIG rdatas apply to a specific type; this type is returned by the covers() function.
int extended_rdatatype(self)
Return a 32-bit type value, the least significant 16 bits of which are the ordinary DNS type, and the upper 16 bits of which are the "covered" type, if any.
string to_text(self, origin, relativize, **kw)
Convert an rdata to text format.
string to_wire(self, file, compress, origin)
Convert an rdata to wire format.
  _cmp(self, other)
Compare an rdata with another rdata of the same rdtype and rdclass.

Class Variable Summary
classmethod from_text
classmethod from_wire

Method Details

__init__(self, rdclass, rdtype)
(Constructor)

Initialize an rdata.
Parameters:
rdclass - The rdata class
           (type=int)
rdtype - The rdata type
           (type=int)

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

choose_relativity(self, origin=None, relativize=1)

Convert any domain names in the rdata to the specified relativization.

covers(self)

DNS SIG rdatas apply to a specific type; this type is returned by the covers() function. If the rdata type is not SIG, dns.rdatatype.NONE is returned. This is useful when creating rdatasets, allowing the rdataset to contain only SIGs of a particular type, e.g. SIG(NS).
Returns:
int

extended_rdatatype(self)

Return a 32-bit type value, the least significant 16 bits of which are the ordinary DNS type, and the upper 16 bits of which are the "covered" type, if any.
Returns:
int

to_text(self, origin=None, relativize=1, **kw)

Convert an rdata to text format.
Returns:
string

to_wire(self, file, compress=None, origin=None)

Convert an rdata to wire format.
Returns:
string

_cmp(self, other)

Compare an rdata with another rdata of the same rdtype and rdclass. Return < 0 if self < other in the DNSSEC ordering, 0 if self == other, and > 0 if self > other.

Class Variable Details

from_text

Type:
classmethod
Value:
<classmethod object at 0x81c8f70>                                      

from_wire

Type:
classmethod
Value:
<classmethod object at 0x81cab88>                                      

Generated by Epydoc 1.1 on Sat Aug 2 15:09:37 2003 http://epydoc.sf.net