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

Class Rdata

object --+
         |
        Rdata

Known Subclasses:
GenericRdata, KEYBase, MXBase, NSBase, SIGBase, CERT, DS, GPOS, HINFO, ISDN, LOC, NSEC, NXT, RP, SOA, SSHFP, TXT, X25, A, AAAA, APL, 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/RRSIG 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
list __slots__
classmethod from_text
classmethod from_wire
member_descriptor rdclass
member_descriptor rdtype

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=True)

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

covers(self)

DNS SIG/RRSIG rdatas apply to a specific type; this type is returned by the covers() function. If the rdata type is not SIG or RRSIG, dns.rdatatype.NONE is returned. This is useful when creating rdatasets, allowing the rdataset to contain only RRSIGs of a particular type, e.g. RRSIG(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=True, **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

__slots__

Type:
list
Value:
['rdclass', 'rdtype']                                                  

from_text

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

from_wire

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

rdclass

Type:
member_descriptor
Value:
<member 'rdclass' of 'Rdata' objects>                                  

rdtype

Type:
member_descriptor
Value:
<member 'rdtype' of 'Rdata' objects>                                   

Generated by Epydoc 1.1 on Sun Jun 6 13:48:48 2004 http://epydoc.sf.net