Home | Trees | Indices | Help |
|
---|
|
1 # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. 2 # 3 # Permission to use, copy, modify, and distribute this software and its 4 # documentation for any purpose with or without fee is hereby granted, 5 # provided that the above copyright notice and this permission notice 6 # appear in all copies. 7 # 8 # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES 9 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR 11 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 14 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 16 import dns.exception 17 import dns.rdata 18 import dns.name 19 import dns.util 2022 """RP record 23 24 @ivar mbox: The responsible person's mailbox 25 @type mbox: dns.name.Name object 26 @ivar txt: The owner name of a node with TXT records, or the root name 27 if no TXT records are associated with this RP. 28 @type txt: dns.name.Name object 29 @see: RFC 1183""" 30 31 __slots__ = ['mbox', 'txt'] 32 378839 mbox = self.mbox.choose_relativity(origin, relativize) 40 txt = self.txt.choose_relativity(origin, relativize) 41 return "%s %s" % (str(mbox), str(txt))4244 mbox = tok.get_name() 45 txt = tok.get_name() 46 mbox = mbox.choose_relativity(origin, relativize) 47 txt = txt.choose_relativity(origin, relativize) 48 tok.get_eol() 49 return cls(rdclass, rdtype, mbox, txt)50 51 from_text = classmethod(from_text) 52 56 6062 (mbox, cused) = dns.name.from_wire(wire[: current + rdlen], 63 current) 64 current += cused 65 rdlen -= cused 66 if rdlen <= 0: 67 raise dns.exception.FormError 68 (txt, cused) = dns.name.from_wire(wire[: current + rdlen], 69 current) 70 if cused != rdlen: 71 raise dns.exception.FormError 72 if not origin is None: 73 mbox = mbox.relativize(origin) 74 txt = txt.relativize(origin) 75 return cls(rdclass, rdtype, mbox, txt)76 77 from_wire = classmethod(from_wire) 7880 self.mbox = self.mbox.choose_relativity(origin, relativize) 81 self.txt = self.txt.choose_relativity(origin, relativize)82
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 31 05:21:21 2013 | http://epydoc.sourceforge.net |