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.name22 23 """RP record 24 25 @ivar mbox: The responsible person's mailbox 26 @type mbox: dns.name.Name object 27 @ivar txt: The owner name of a node with TXT records, or the root name 28 if no TXT records are associated with this RP. 29 @type txt: dns.name.Name object 30 @see: RFC 1183""" 31 32 __slots__ = ['mbox', 'txt'] 33 388140 mbox = self.mbox.choose_relativity(origin, relativize) 41 txt = self.txt.choose_relativity(origin, relativize) 42 return "%s %s" % (str(mbox), str(txt))43 44 @classmethod46 mbox = tok.get_name() 47 txt = tok.get_name() 48 mbox = mbox.choose_relativity(origin, relativize) 49 txt = txt.choose_relativity(origin, relativize) 50 tok.get_eol() 51 return cls(rdclass, rdtype, mbox, txt)52 56 60 61 @classmethod63 (mbox, cused) = dns.name.from_wire(wire[: current + rdlen], 64 current) 65 current += cused 66 rdlen -= cused 67 if rdlen <= 0: 68 raise dns.exception.FormError 69 (txt, cused) = dns.name.from_wire(wire[: current + rdlen], 70 current) 71 if cused != rdlen: 72 raise dns.exception.FormError 73 if origin is not None: 74 mbox = mbox.relativize(origin) 75 txt = txt.relativize(origin) 76 return cls(rdclass, rdtype, mbox, txt)7779 self.mbox = self.mbox.choose_relativity(origin, relativize) 80 self.txt = self.txt.choose_relativity(origin, relativize)
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Sep 30 08:16:44 2016 | http://epydoc.sourceforge.net |