def __init__(self, order, preference, flags, service, regexp, replacement=None): self.order = order self.preference = preference self.flags = flags self.service = service self.regexp = regexp self.replacement = replacement or DNSLabel([])
def set_rname(self, rname): if isinstance(rname, DNSLabel): self._rname = rname else: self._rname = DNSLabel(rname)
def set_mname(self, mname): if isinstance(mname, DNSLabel): self._mname = mname else: self._mname = DNSLabel(mname)
def set_label(self, label): if isinstance(label, DNSLabel): self._label = label else: self._label = DNSLabel(label)
def set_mx(self, mx): if isinstance(mx, DNSLabel): self._mx = mx else: self._mx = DNSLabel(mx)
def set_qname(self, qname): if isinstance(qname, DNSLabel): self._qname = qname else: self._qname = DNSLabel(qname)