1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 """NS-like base classes."""
17
18 import io
19
20 import dns.exception
21 import dns.rdata
22 import dns.name
23 import dns.util
24
25 -class NSBase(dns.rdata.Rdata):
26 """Base class for rdata that is like an NS record.
27
28 @ivar target: the target name of the rdata
29 @type target: dns.name.Name object"""
30
31 __slots__ = ['target']
32
33 - def __init__(self, rdclass, rdtype, target):
36
37 - def to_text(self, origin=None, relativize=True, **kw):
40
41 @classmethod
42 - def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True):
47
48 - def to_wire(self, file, compress = None, origin = None):
50
53
54 @classmethod
55 - def from_wire(cls, rdclass, rdtype, wire, current, rdlen, origin = None):
63
66
67 - def _cmp(self, other):
69
71 """Base class for rdata that is like an NS record, but whose name
72 is not compressed when convert to DNS wire format, and whose
73 digestable form is not downcased."""
74
75 - def to_wire(self, file, compress = None, origin = None):
77
79 return self.to_wire(None, None, origin)
80