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 1921 """RP record 22 23 @ivar mbox: The responsible person's mailbox 24 @type mbox: dns.name.Name object 25 @ivar txt: The owner name of a node with TXT records, or the root name 26 if no TXT records are associated with this RP. 27 @type txt: dns.name.Name object 28 @see: RFC 1183""" 29 30 __slots__ = ['mbox', 'txt'] 31 368738 mbox = self.mbox.choose_relativity(origin, relativize) 39 txt = self.txt.choose_relativity(origin, relativize) 40 return "%s %s" % (str(mbox), str(txt))4143 mbox = tok.get_name() 44 txt = tok.get_name() 45 mbox = mbox.choose_relativity(origin, relativize) 46 txt = txt.choose_relativity(origin, relativize) 47 tok.get_eol() 48 return cls(rdclass, rdtype, mbox, txt)49 50 from_text = classmethod(from_text) 51 55 5961 (mbox, cused) = dns.name.from_wire(wire[: current + rdlen], 62 current) 63 current += cused 64 rdlen -= cused 65 if rdlen <= 0: 66 raise dns.exception.FormError 67 (txt, cused) = dns.name.from_wire(wire[: current + rdlen], 68 current) 69 if cused != rdlen: 70 raise dns.exception.FormError 71 if not origin is None: 72 mbox = mbox.relativize(origin) 73 txt = txt.relativize(origin) 74 return cls(rdclass, rdtype, mbox, txt)75 76 from_wire = classmethod(from_wire) 7779 self.mbox = self.mbox.choose_relativity(origin, relativize) 80 self.txt = self.txt.choose_relativity(origin, relativize)81
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Mar 22 09:18:02 2013 | http://epydoc.sourceforge.net |