PATH:
usr
/
lib
/
python3.9
/
site-packages
/
dns
/
rdtypes
/
ANY
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license import struct import dns.immutable import dns.rdata @dns.immutable.immutable class LP(dns.rdata.Rdata): """LP record""" # see: rfc6742.txt __slots__ = ["preference", "fqdn"] def __init__(self, rdclass, rdtype, preference, fqdn): super().__init__(rdclass, rdtype) self.preference = self._as_uint16(preference) self.fqdn = self._as_name(fqdn) def to_text(self, origin=None, relativize=True, **kw): fqdn = self.fqdn.choose_relativity(origin, relativize) return "%d %s" % (self.preference, fqdn) @classmethod def from_text( cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None ): preference = tok.get_uint16() fqdn = tok.get_name(origin, relativize, relativize_to) return cls(rdclass, rdtype, preference, fqdn) def _to_wire(self, file, compress=None, origin=None, canonicalize=False): file.write(struct.pack("!H", self.preference)) self.fqdn.to_wire(file, compress, origin, canonicalize) @classmethod def from_wire_parser(cls, rdclass, rdtype, parser, origin=None): preference = parser.get_uint16() fqdn = parser.get_name(origin) return cls(rdclass, rdtype, preference, fqdn)
[-] MX.py
[edit]
[-] DNAME.py
[edit]
[-] RP.py
[edit]
[-] NSEC3PARAM.py
[edit]
[-] DNSKEY.py
[edit]
[-] CAA.py
[edit]
[-] EUI48.py
[edit]
[-] NINFO.py
[edit]
[-] NSEC3.py
[edit]
[-] URI.py
[edit]
[-] AVC.py
[edit]
[-] OPT.py
[edit]
[-] SSHFP.py
[edit]
[-] AMTRELAY.py
[edit]
[-] TLSA.py
[edit]
[-] RT.py
[edit]
[-] PTR.py
[edit]
[-] CDS.py
[edit]
[-] __init__.py
[edit]
[-] AFSDB.py
[edit]
[-] OPENPGPKEY.py
[edit]
[-] TKEY.py
[edit]
[-] TSIG.py
[edit]
[-] CDNSKEY.py
[edit]
[-] CSYNC.py
[edit]
[-] NS.py
[edit]
[-] SMIMEA.py
[edit]
[-] EUI64.py
[edit]
[+]
..
[-] ZONEMD.py
[edit]
[-] CNAME.py
[edit]
[-] LOC.py
[edit]
[-] DS.py
[edit]
[-] SOA.py
[edit]
[-] X25.py
[edit]
[-] CERT.py
[edit]
[-] L32.py
[edit]
[-] RRSIG.py
[edit]
[-] NSEC.py
[edit]
[-] LP.py
[edit]
[-] ISDN.py
[edit]
[-] DLV.py
[edit]
[+]
__pycache__
[-] L64.py
[edit]
[-] TXT.py
[edit]
[-] GPOS.py
[edit]
[-] NID.py
[edit]
[-] HINFO.py
[edit]
[-] HIP.py
[edit]
[-] SPF.py
[edit]