ZTWHHH commited on
Commit
6756267
·
verified ·
1 Parent(s): 99e2c42

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. vllm/lib/python3.10/site-packages/dns/__pycache__/__init__.cpython-310.pyc +0 -0
  2. vllm/lib/python3.10/site-packages/dns/__pycache__/_asyncbackend.cpython-310.pyc +0 -0
  3. vllm/lib/python3.10/site-packages/dns/__pycache__/_asyncio_backend.cpython-310.pyc +0 -0
  4. vllm/lib/python3.10/site-packages/dns/__pycache__/asyncbackend.cpython-310.pyc +0 -0
  5. vllm/lib/python3.10/site-packages/dns/__pycache__/asyncresolver.cpython-310.pyc +0 -0
  6. vllm/lib/python3.10/site-packages/dns/__pycache__/dnssec.cpython-310.pyc +0 -0
  7. vllm/lib/python3.10/site-packages/dns/__pycache__/dnssectypes.cpython-310.pyc +0 -0
  8. vllm/lib/python3.10/site-packages/dns/__pycache__/entropy.cpython-310.pyc +0 -0
  9. vllm/lib/python3.10/site-packages/dns/__pycache__/enum.cpython-310.pyc +0 -0
  10. vllm/lib/python3.10/site-packages/dns/__pycache__/flags.cpython-310.pyc +0 -0
  11. vllm/lib/python3.10/site-packages/dns/__pycache__/ipv4.cpython-310.pyc +0 -0
  12. vllm/lib/python3.10/site-packages/dns/__pycache__/ipv6.cpython-310.pyc +0 -0
  13. vllm/lib/python3.10/site-packages/dns/__pycache__/name.cpython-310.pyc +0 -0
  14. vllm/lib/python3.10/site-packages/dns/__pycache__/namedict.cpython-310.pyc +0 -0
  15. vllm/lib/python3.10/site-packages/dns/__pycache__/nameserver.cpython-310.pyc +0 -0
  16. vllm/lib/python3.10/site-packages/dns/__pycache__/node.cpython-310.pyc +0 -0
  17. vllm/lib/python3.10/site-packages/dns/__pycache__/query.cpython-310.pyc +0 -0
  18. vllm/lib/python3.10/site-packages/dns/__pycache__/rcode.cpython-310.pyc +0 -0
  19. vllm/lib/python3.10/site-packages/dns/__pycache__/rdataset.cpython-310.pyc +0 -0
  20. vllm/lib/python3.10/site-packages/dns/__pycache__/renderer.cpython-310.pyc +0 -0
  21. vllm/lib/python3.10/site-packages/dns/__pycache__/reversename.cpython-310.pyc +0 -0
  22. vllm/lib/python3.10/site-packages/dns/__pycache__/rrset.cpython-310.pyc +0 -0
  23. vllm/lib/python3.10/site-packages/dns/__pycache__/set.cpython-310.pyc +0 -0
  24. vllm/lib/python3.10/site-packages/dns/__pycache__/tokenizer.cpython-310.pyc +0 -0
  25. vllm/lib/python3.10/site-packages/dns/__pycache__/tsig.cpython-310.pyc +0 -0
  26. vllm/lib/python3.10/site-packages/dns/__pycache__/version.cpython-310.pyc +0 -0
  27. vllm/lib/python3.10/site-packages/dns/__pycache__/wire.cpython-310.pyc +0 -0
  28. vllm/lib/python3.10/site-packages/dns/__pycache__/zonefile.cpython-310.pyc +0 -0
  29. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/AFSDB.py +45 -0
  30. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/AMTRELAY.py +91 -0
  31. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/AVC.py +26 -0
  32. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CAA.py +71 -0
  33. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CDNSKEY.py +33 -0
  34. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CDS.py +29 -0
  35. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CERT.py +116 -0
  36. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CNAME.py +28 -0
  37. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DLV.py +24 -0
  38. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DNAME.py +27 -0
  39. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DNSKEY.py +33 -0
  40. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DS.py +24 -0
  41. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/EUI48.py +30 -0
  42. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/HINFO.py +64 -0
  43. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/HIP.py +85 -0
  44. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/L32.py +41 -0
  45. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/LOC.py +353 -0
  46. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/LP.py +42 -0
  47. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/MX.py +24 -0
  48. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/NID.py +47 -0
  49. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/NS.py +24 -0
  50. vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/NSEC.py +67 -0
vllm/lib/python3.10/site-packages/dns/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (681 Bytes). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/_asyncbackend.cpython-310.pyc ADDED
Binary file (4.13 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/_asyncio_backend.cpython-310.pyc ADDED
Binary file (8.94 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/asyncbackend.cpython-310.pyc ADDED
Binary file (2.61 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/asyncresolver.cpython-310.pyc ADDED
Binary file (13.2 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/dnssec.cpython-310.pyc ADDED
Binary file (32.8 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/dnssectypes.cpython-310.pyc ADDED
Binary file (1.62 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/entropy.cpython-310.pyc ADDED
Binary file (3.37 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/enum.cpython-310.pyc ADDED
Binary file (3.26 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/flags.cpython-310.pyc ADDED
Binary file (2.17 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/ipv4.cpython-310.pyc ADDED
Binary file (1.85 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/ipv6.cpython-310.pyc ADDED
Binary file (3.91 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/name.cpython-310.pyc ADDED
Binary file (34.8 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/namedict.cpython-310.pyc ADDED
Binary file (3 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/nameserver.cpython-310.pyc ADDED
Binary file (9.26 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/node.cpython-310.pyc ADDED
Binary file (11.6 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/query.cpython-310.pyc ADDED
Binary file (44.3 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/rcode.cpython-310.pyc ADDED
Binary file (3.25 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/rdataset.cpython-310.pyc ADDED
Binary file (15.3 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/renderer.cpython-310.pyc ADDED
Binary file (9.9 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/reversename.cpython-310.pyc ADDED
Binary file (3.06 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/rrset.cpython-310.pyc ADDED
Binary file (7.93 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/set.cpython-310.pyc ADDED
Binary file (8.73 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/tokenizer.cpython-310.pyc ADDED
Binary file (17.1 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/tsig.cpython-310.pyc ADDED
Binary file (10.2 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/version.cpython-310.pyc ADDED
Binary file (572 Bytes). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/wire.cpython-310.pyc ADDED
Binary file (3.31 kB). View file
 
vllm/lib/python3.10/site-packages/dns/__pycache__/zonefile.cpython-310.pyc ADDED
Binary file (17.7 kB). View file
 
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/AFSDB.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.mxbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class AFSDB(dns.rdtypes.mxbase.UncompressedDowncasingMX):
24
+ """AFSDB record"""
25
+
26
+ # Use the property mechanism to make "subtype" an alias for the
27
+ # "preference" attribute, and "hostname" an alias for the "exchange"
28
+ # attribute.
29
+ #
30
+ # This lets us inherit the UncompressedMX implementation but lets
31
+ # the caller use appropriate attribute names for the rdata type.
32
+ #
33
+ # We probably lose some performance vs. a cut-and-paste
34
+ # implementation, but this way we don't copy code, and that's
35
+ # good.
36
+
37
+ @property
38
+ def subtype(self):
39
+ "the AFSDB subtype"
40
+ return self.preference
41
+
42
+ @property
43
+ def hostname(self):
44
+ "the AFSDB hostname"
45
+ return self.exchange
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/AMTRELAY.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2006, 2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import struct
19
+
20
+ import dns.exception
21
+ import dns.immutable
22
+ import dns.rdtypes.util
23
+
24
+
25
+ class Relay(dns.rdtypes.util.Gateway):
26
+ name = "AMTRELAY relay"
27
+
28
+ @property
29
+ def relay(self):
30
+ return self.gateway
31
+
32
+
33
+ @dns.immutable.immutable
34
+ class AMTRELAY(dns.rdata.Rdata):
35
+ """AMTRELAY record"""
36
+
37
+ # see: RFC 8777
38
+
39
+ __slots__ = ["precedence", "discovery_optional", "relay_type", "relay"]
40
+
41
+ def __init__(
42
+ self, rdclass, rdtype, precedence, discovery_optional, relay_type, relay
43
+ ):
44
+ super().__init__(rdclass, rdtype)
45
+ relay = Relay(relay_type, relay)
46
+ self.precedence = self._as_uint8(precedence)
47
+ self.discovery_optional = self._as_bool(discovery_optional)
48
+ self.relay_type = relay.type
49
+ self.relay = relay.relay
50
+
51
+ def to_text(self, origin=None, relativize=True, **kw):
52
+ relay = Relay(self.relay_type, self.relay).to_text(origin, relativize)
53
+ return "%d %d %d %s" % (
54
+ self.precedence,
55
+ self.discovery_optional,
56
+ self.relay_type,
57
+ relay,
58
+ )
59
+
60
+ @classmethod
61
+ def from_text(
62
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
63
+ ):
64
+ precedence = tok.get_uint8()
65
+ discovery_optional = tok.get_uint8()
66
+ if discovery_optional > 1:
67
+ raise dns.exception.SyntaxError("expecting 0 or 1")
68
+ discovery_optional = bool(discovery_optional)
69
+ relay_type = tok.get_uint8()
70
+ if relay_type > 0x7F:
71
+ raise dns.exception.SyntaxError("expecting an integer <= 127")
72
+ relay = Relay.from_text(relay_type, tok, origin, relativize, relativize_to)
73
+ return cls(
74
+ rdclass, rdtype, precedence, discovery_optional, relay_type, relay.relay
75
+ )
76
+
77
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
78
+ relay_type = self.relay_type | (self.discovery_optional << 7)
79
+ header = struct.pack("!BB", self.precedence, relay_type)
80
+ file.write(header)
81
+ Relay(self.relay_type, self.relay).to_wire(file, compress, origin, canonicalize)
82
+
83
+ @classmethod
84
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
85
+ (precedence, relay_type) = parser.get_struct("!BB")
86
+ discovery_optional = bool(relay_type >> 7)
87
+ relay_type &= 0x7F
88
+ relay = Relay.from_wire_parser(relay_type, parser, origin)
89
+ return cls(
90
+ rdclass, rdtype, precedence, discovery_optional, relay_type, relay.relay
91
+ )
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/AVC.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2016 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.txtbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class AVC(dns.rdtypes.txtbase.TXTBase):
24
+ """AVC record"""
25
+
26
+ # See: IANA dns parameters for AVC
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CAA.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import struct
19
+
20
+ import dns.exception
21
+ import dns.immutable
22
+ import dns.rdata
23
+ import dns.tokenizer
24
+
25
+
26
+ @dns.immutable.immutable
27
+ class CAA(dns.rdata.Rdata):
28
+ """CAA (Certification Authority Authorization) record"""
29
+
30
+ # see: RFC 6844
31
+
32
+ __slots__ = ["flags", "tag", "value"]
33
+
34
+ def __init__(self, rdclass, rdtype, flags, tag, value):
35
+ super().__init__(rdclass, rdtype)
36
+ self.flags = self._as_uint8(flags)
37
+ self.tag = self._as_bytes(tag, True, 255)
38
+ if not tag.isalnum():
39
+ raise ValueError("tag is not alphanumeric")
40
+ self.value = self._as_bytes(value)
41
+
42
+ def to_text(self, origin=None, relativize=True, **kw):
43
+ return '%u %s "%s"' % (
44
+ self.flags,
45
+ dns.rdata._escapify(self.tag),
46
+ dns.rdata._escapify(self.value),
47
+ )
48
+
49
+ @classmethod
50
+ def from_text(
51
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
52
+ ):
53
+ flags = tok.get_uint8()
54
+ tag = tok.get_string().encode()
55
+ value = tok.get_string().encode()
56
+ return cls(rdclass, rdtype, flags, tag, value)
57
+
58
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
59
+ file.write(struct.pack("!B", self.flags))
60
+ l = len(self.tag)
61
+ assert l < 256
62
+ file.write(struct.pack("!B", l))
63
+ file.write(self.tag)
64
+ file.write(self.value)
65
+
66
+ @classmethod
67
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
68
+ flags = parser.get_uint8()
69
+ tag = parser.get_counted_bytes()
70
+ value = parser.get_remaining()
71
+ return cls(rdclass, rdtype, flags, tag, value)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CDNSKEY.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2004-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.dnskeybase # lgtm[py/import-and-import-from]
20
+
21
+ # pylint: disable=unused-import
22
+ from dns.rdtypes.dnskeybase import ( # noqa: F401 lgtm[py/unused-import]
23
+ REVOKE,
24
+ SEP,
25
+ ZONE,
26
+ )
27
+
28
+ # pylint: enable=unused-import
29
+
30
+
31
+ @dns.immutable.immutable
32
+ class CDNSKEY(dns.rdtypes.dnskeybase.DNSKEYBase):
33
+ """CDNSKEY record"""
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CDS.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.dsbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class CDS(dns.rdtypes.dsbase.DSBase):
24
+ """CDS record"""
25
+
26
+ _digest_length_by_type = {
27
+ **dns.rdtypes.dsbase.DSBase._digest_length_by_type,
28
+ 0: 1, # delete, RFC 8078 Sec. 4 (including Errata ID 5049)
29
+ }
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CERT.py ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import base64
19
+ import struct
20
+
21
+ import dns.dnssectypes
22
+ import dns.exception
23
+ import dns.immutable
24
+ import dns.rdata
25
+ import dns.tokenizer
26
+
27
+ _ctype_by_value = {
28
+ 1: "PKIX",
29
+ 2: "SPKI",
30
+ 3: "PGP",
31
+ 4: "IPKIX",
32
+ 5: "ISPKI",
33
+ 6: "IPGP",
34
+ 7: "ACPKIX",
35
+ 8: "IACPKIX",
36
+ 253: "URI",
37
+ 254: "OID",
38
+ }
39
+
40
+ _ctype_by_name = {
41
+ "PKIX": 1,
42
+ "SPKI": 2,
43
+ "PGP": 3,
44
+ "IPKIX": 4,
45
+ "ISPKI": 5,
46
+ "IPGP": 6,
47
+ "ACPKIX": 7,
48
+ "IACPKIX": 8,
49
+ "URI": 253,
50
+ "OID": 254,
51
+ }
52
+
53
+
54
+ def _ctype_from_text(what):
55
+ v = _ctype_by_name.get(what)
56
+ if v is not None:
57
+ return v
58
+ return int(what)
59
+
60
+
61
+ def _ctype_to_text(what):
62
+ v = _ctype_by_value.get(what)
63
+ if v is not None:
64
+ return v
65
+ return str(what)
66
+
67
+
68
+ @dns.immutable.immutable
69
+ class CERT(dns.rdata.Rdata):
70
+ """CERT record"""
71
+
72
+ # see RFC 4398
73
+
74
+ __slots__ = ["certificate_type", "key_tag", "algorithm", "certificate"]
75
+
76
+ def __init__(
77
+ self, rdclass, rdtype, certificate_type, key_tag, algorithm, certificate
78
+ ):
79
+ super().__init__(rdclass, rdtype)
80
+ self.certificate_type = self._as_uint16(certificate_type)
81
+ self.key_tag = self._as_uint16(key_tag)
82
+ self.algorithm = self._as_uint8(algorithm)
83
+ self.certificate = self._as_bytes(certificate)
84
+
85
+ def to_text(self, origin=None, relativize=True, **kw):
86
+ certificate_type = _ctype_to_text(self.certificate_type)
87
+ return "%s %d %s %s" % (
88
+ certificate_type,
89
+ self.key_tag,
90
+ dns.dnssectypes.Algorithm.to_text(self.algorithm),
91
+ dns.rdata._base64ify(self.certificate, **kw),
92
+ )
93
+
94
+ @classmethod
95
+ def from_text(
96
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
97
+ ):
98
+ certificate_type = _ctype_from_text(tok.get_string())
99
+ key_tag = tok.get_uint16()
100
+ algorithm = dns.dnssectypes.Algorithm.from_text(tok.get_string())
101
+ b64 = tok.concatenate_remaining_identifiers().encode()
102
+ certificate = base64.b64decode(b64)
103
+ return cls(rdclass, rdtype, certificate_type, key_tag, algorithm, certificate)
104
+
105
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
106
+ prefix = struct.pack(
107
+ "!HHB", self.certificate_type, self.key_tag, self.algorithm
108
+ )
109
+ file.write(prefix)
110
+ file.write(self.certificate)
111
+
112
+ @classmethod
113
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
114
+ (certificate_type, key_tag, algorithm) = parser.get_struct("!HHB")
115
+ certificate = parser.get_remaining()
116
+ return cls(rdclass, rdtype, certificate_type, key_tag, algorithm, certificate)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/CNAME.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.nsbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class CNAME(dns.rdtypes.nsbase.NSBase):
24
+ """CNAME record
25
+
26
+ Note: although CNAME is officially a singleton type, dnspython allows
27
+ non-singleton CNAME rdatasets because such sets have been commonly
28
+ used by BIND and other nameservers for load balancing."""
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DLV.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.dsbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class DLV(dns.rdtypes.dsbase.DSBase):
24
+ """DLV record"""
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DNAME.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.nsbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class DNAME(dns.rdtypes.nsbase.UncompressedNS):
24
+ """DNAME record"""
25
+
26
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
27
+ self.target.to_wire(file, None, origin, canonicalize)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DNSKEY.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2004-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.dnskeybase # lgtm[py/import-and-import-from]
20
+
21
+ # pylint: disable=unused-import
22
+ from dns.rdtypes.dnskeybase import ( # noqa: F401 lgtm[py/unused-import]
23
+ REVOKE,
24
+ SEP,
25
+ ZONE,
26
+ )
27
+
28
+ # pylint: enable=unused-import
29
+
30
+
31
+ @dns.immutable.immutable
32
+ class DNSKEY(dns.rdtypes.dnskeybase.DNSKEYBase):
33
+ """DNSKEY record"""
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/DS.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.dsbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class DS(dns.rdtypes.dsbase.DSBase):
24
+ """DS record"""
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/EUI48.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2015 Red Hat, Inc.
4
+ # Author: Petr Spacek <pspacek@redhat.com>
5
+ #
6
+ # Permission to use, copy, modify, and distribute this software and its
7
+ # documentation for any purpose with or without fee is hereby granted,
8
+ # provided that the above copyright notice and this permission notice
9
+ # appear in all copies.
10
+ #
11
+ # THE SOFTWARE IS PROVIDED 'AS IS' AND RED HAT DISCLAIMS ALL WARRANTIES
12
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
14
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
+
19
+ import dns.immutable
20
+ import dns.rdtypes.euibase
21
+
22
+
23
+ @dns.immutable.immutable
24
+ class EUI48(dns.rdtypes.euibase.EUIBase):
25
+ """EUI48 record"""
26
+
27
+ # see: rfc7043.txt
28
+
29
+ byte_len = 6 # 0123456789ab (in hex)
30
+ text_len = byte_len * 3 - 1 # 01-23-45-67-89-ab
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/HINFO.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import struct
19
+
20
+ import dns.exception
21
+ import dns.immutable
22
+ import dns.rdata
23
+ import dns.tokenizer
24
+
25
+
26
+ @dns.immutable.immutable
27
+ class HINFO(dns.rdata.Rdata):
28
+ """HINFO record"""
29
+
30
+ # see: RFC 1035
31
+
32
+ __slots__ = ["cpu", "os"]
33
+
34
+ def __init__(self, rdclass, rdtype, cpu, os):
35
+ super().__init__(rdclass, rdtype)
36
+ self.cpu = self._as_bytes(cpu, True, 255)
37
+ self.os = self._as_bytes(os, True, 255)
38
+
39
+ def to_text(self, origin=None, relativize=True, **kw):
40
+ return f'"{dns.rdata._escapify(self.cpu)}" "{dns.rdata._escapify(self.os)}"'
41
+
42
+ @classmethod
43
+ def from_text(
44
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
45
+ ):
46
+ cpu = tok.get_string(max_length=255)
47
+ os = tok.get_string(max_length=255)
48
+ return cls(rdclass, rdtype, cpu, os)
49
+
50
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
51
+ l = len(self.cpu)
52
+ assert l < 256
53
+ file.write(struct.pack("!B", l))
54
+ file.write(self.cpu)
55
+ l = len(self.os)
56
+ assert l < 256
57
+ file.write(struct.pack("!B", l))
58
+ file.write(self.os)
59
+
60
+ @classmethod
61
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
62
+ cpu = parser.get_counted_bytes()
63
+ os = parser.get_counted_bytes()
64
+ return cls(rdclass, rdtype, cpu, os)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/HIP.py ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2010, 2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import base64
19
+ import binascii
20
+ import struct
21
+
22
+ import dns.exception
23
+ import dns.immutable
24
+ import dns.rdata
25
+ import dns.rdatatype
26
+
27
+
28
+ @dns.immutable.immutable
29
+ class HIP(dns.rdata.Rdata):
30
+ """HIP record"""
31
+
32
+ # see: RFC 5205
33
+
34
+ __slots__ = ["hit", "algorithm", "key", "servers"]
35
+
36
+ def __init__(self, rdclass, rdtype, hit, algorithm, key, servers):
37
+ super().__init__(rdclass, rdtype)
38
+ self.hit = self._as_bytes(hit, True, 255)
39
+ self.algorithm = self._as_uint8(algorithm)
40
+ self.key = self._as_bytes(key, True)
41
+ self.servers = self._as_tuple(servers, self._as_name)
42
+
43
+ def to_text(self, origin=None, relativize=True, **kw):
44
+ hit = binascii.hexlify(self.hit).decode()
45
+ key = base64.b64encode(self.key).replace(b"\n", b"").decode()
46
+ text = ""
47
+ servers = []
48
+ for server in self.servers:
49
+ servers.append(server.choose_relativity(origin, relativize))
50
+ if len(servers) > 0:
51
+ text += " " + " ".join(x.to_unicode() for x in servers)
52
+ return "%u %s %s%s" % (self.algorithm, hit, key, text)
53
+
54
+ @classmethod
55
+ def from_text(
56
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
57
+ ):
58
+ algorithm = tok.get_uint8()
59
+ hit = binascii.unhexlify(tok.get_string().encode())
60
+ key = base64.b64decode(tok.get_string().encode())
61
+ servers = []
62
+ for token in tok.get_remaining():
63
+ server = tok.as_name(token, origin, relativize, relativize_to)
64
+ servers.append(server)
65
+ return cls(rdclass, rdtype, hit, algorithm, key, servers)
66
+
67
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
68
+ lh = len(self.hit)
69
+ lk = len(self.key)
70
+ file.write(struct.pack("!BBH", lh, self.algorithm, lk))
71
+ file.write(self.hit)
72
+ file.write(self.key)
73
+ for server in self.servers:
74
+ server.to_wire(file, None, origin, False)
75
+
76
+ @classmethod
77
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
78
+ (lh, algorithm, lk) = parser.get_struct("!BBH")
79
+ hit = parser.get_bytes(lh)
80
+ key = parser.get_bytes(lk)
81
+ servers = []
82
+ while parser.remaining() > 0:
83
+ server = parser.get_name(origin)
84
+ servers.append(server)
85
+ return cls(rdclass, rdtype, hit, algorithm, key, servers)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/L32.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ import struct
4
+
5
+ import dns.immutable
6
+ import dns.rdata
7
+
8
+
9
+ @dns.immutable.immutable
10
+ class L32(dns.rdata.Rdata):
11
+ """L32 record"""
12
+
13
+ # see: rfc6742.txt
14
+
15
+ __slots__ = ["preference", "locator32"]
16
+
17
+ def __init__(self, rdclass, rdtype, preference, locator32):
18
+ super().__init__(rdclass, rdtype)
19
+ self.preference = self._as_uint16(preference)
20
+ self.locator32 = self._as_ipv4_address(locator32)
21
+
22
+ def to_text(self, origin=None, relativize=True, **kw):
23
+ return f"{self.preference} {self.locator32}"
24
+
25
+ @classmethod
26
+ def from_text(
27
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
28
+ ):
29
+ preference = tok.get_uint16()
30
+ nodeid = tok.get_identifier()
31
+ return cls(rdclass, rdtype, preference, nodeid)
32
+
33
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
34
+ file.write(struct.pack("!H", self.preference))
35
+ file.write(dns.ipv4.inet_aton(self.locator32))
36
+
37
+ @classmethod
38
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
39
+ preference = parser.get_uint16()
40
+ locator32 = parser.get_remaining()
41
+ return cls(rdclass, rdtype, preference, locator32)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/LOC.py ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import struct
19
+
20
+ import dns.exception
21
+ import dns.immutable
22
+ import dns.rdata
23
+
24
+ _pows = tuple(10**i for i in range(0, 11))
25
+
26
+ # default values are in centimeters
27
+ _default_size = 100.0
28
+ _default_hprec = 1000000.0
29
+ _default_vprec = 1000.0
30
+
31
+ # for use by from_wire()
32
+ _MAX_LATITUDE = 0x80000000 + 90 * 3600000
33
+ _MIN_LATITUDE = 0x80000000 - 90 * 3600000
34
+ _MAX_LONGITUDE = 0x80000000 + 180 * 3600000
35
+ _MIN_LONGITUDE = 0x80000000 - 180 * 3600000
36
+
37
+
38
+ def _exponent_of(what, desc):
39
+ if what == 0:
40
+ return 0
41
+ exp = None
42
+ for i, pow in enumerate(_pows):
43
+ if what < pow:
44
+ exp = i - 1
45
+ break
46
+ if exp is None or exp < 0:
47
+ raise dns.exception.SyntaxError(f"{desc} value out of bounds")
48
+ return exp
49
+
50
+
51
+ def _float_to_tuple(what):
52
+ if what < 0:
53
+ sign = -1
54
+ what *= -1
55
+ else:
56
+ sign = 1
57
+ what = round(what * 3600000)
58
+ degrees = int(what // 3600000)
59
+ what -= degrees * 3600000
60
+ minutes = int(what // 60000)
61
+ what -= minutes * 60000
62
+ seconds = int(what // 1000)
63
+ what -= int(seconds * 1000)
64
+ what = int(what)
65
+ return (degrees, minutes, seconds, what, sign)
66
+
67
+
68
+ def _tuple_to_float(what):
69
+ value = float(what[0])
70
+ value += float(what[1]) / 60.0
71
+ value += float(what[2]) / 3600.0
72
+ value += float(what[3]) / 3600000.0
73
+ return float(what[4]) * value
74
+
75
+
76
+ def _encode_size(what, desc):
77
+ what = int(what)
78
+ exponent = _exponent_of(what, desc) & 0xF
79
+ base = what // pow(10, exponent) & 0xF
80
+ return base * 16 + exponent
81
+
82
+
83
+ def _decode_size(what, desc):
84
+ exponent = what & 0x0F
85
+ if exponent > 9:
86
+ raise dns.exception.FormError(f"bad {desc} exponent")
87
+ base = (what & 0xF0) >> 4
88
+ if base > 9:
89
+ raise dns.exception.FormError(f"bad {desc} base")
90
+ return base * pow(10, exponent)
91
+
92
+
93
+ def _check_coordinate_list(value, low, high):
94
+ if value[0] < low or value[0] > high:
95
+ raise ValueError(f"not in range [{low}, {high}]")
96
+ if value[1] < 0 or value[1] > 59:
97
+ raise ValueError("bad minutes value")
98
+ if value[2] < 0 or value[2] > 59:
99
+ raise ValueError("bad seconds value")
100
+ if value[3] < 0 or value[3] > 999:
101
+ raise ValueError("bad milliseconds value")
102
+ if value[4] != 1 and value[4] != -1:
103
+ raise ValueError("bad hemisphere value")
104
+
105
+
106
+ @dns.immutable.immutable
107
+ class LOC(dns.rdata.Rdata):
108
+ """LOC record"""
109
+
110
+ # see: RFC 1876
111
+
112
+ __slots__ = [
113
+ "latitude",
114
+ "longitude",
115
+ "altitude",
116
+ "size",
117
+ "horizontal_precision",
118
+ "vertical_precision",
119
+ ]
120
+
121
+ def __init__(
122
+ self,
123
+ rdclass,
124
+ rdtype,
125
+ latitude,
126
+ longitude,
127
+ altitude,
128
+ size=_default_size,
129
+ hprec=_default_hprec,
130
+ vprec=_default_vprec,
131
+ ):
132
+ """Initialize a LOC record instance.
133
+
134
+ The parameters I{latitude} and I{longitude} may be either a 4-tuple
135
+ of integers specifying (degrees, minutes, seconds, milliseconds),
136
+ or they may be floating point values specifying the number of
137
+ degrees. The other parameters are floats. Size, horizontal precision,
138
+ and vertical precision are specified in centimeters."""
139
+
140
+ super().__init__(rdclass, rdtype)
141
+ if isinstance(latitude, int):
142
+ latitude = float(latitude)
143
+ if isinstance(latitude, float):
144
+ latitude = _float_to_tuple(latitude)
145
+ _check_coordinate_list(latitude, -90, 90)
146
+ self.latitude = tuple(latitude)
147
+ if isinstance(longitude, int):
148
+ longitude = float(longitude)
149
+ if isinstance(longitude, float):
150
+ longitude = _float_to_tuple(longitude)
151
+ _check_coordinate_list(longitude, -180, 180)
152
+ self.longitude = tuple(longitude)
153
+ self.altitude = float(altitude)
154
+ self.size = float(size)
155
+ self.horizontal_precision = float(hprec)
156
+ self.vertical_precision = float(vprec)
157
+
158
+ def to_text(self, origin=None, relativize=True, **kw):
159
+ if self.latitude[4] > 0:
160
+ lat_hemisphere = "N"
161
+ else:
162
+ lat_hemisphere = "S"
163
+ if self.longitude[4] > 0:
164
+ long_hemisphere = "E"
165
+ else:
166
+ long_hemisphere = "W"
167
+ text = "%d %d %d.%03d %s %d %d %d.%03d %s %0.2fm" % (
168
+ self.latitude[0],
169
+ self.latitude[1],
170
+ self.latitude[2],
171
+ self.latitude[3],
172
+ lat_hemisphere,
173
+ self.longitude[0],
174
+ self.longitude[1],
175
+ self.longitude[2],
176
+ self.longitude[3],
177
+ long_hemisphere,
178
+ self.altitude / 100.0,
179
+ )
180
+
181
+ # do not print default values
182
+ if (
183
+ self.size != _default_size
184
+ or self.horizontal_precision != _default_hprec
185
+ or self.vertical_precision != _default_vprec
186
+ ):
187
+ text += (
188
+ f" {self.size / 100.0:0.2f}m {self.horizontal_precision / 100.0:0.2f}m"
189
+ f" {self.vertical_precision / 100.0:0.2f}m"
190
+ )
191
+ return text
192
+
193
+ @classmethod
194
+ def from_text(
195
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
196
+ ):
197
+ latitude = [0, 0, 0, 0, 1]
198
+ longitude = [0, 0, 0, 0, 1]
199
+ size = _default_size
200
+ hprec = _default_hprec
201
+ vprec = _default_vprec
202
+
203
+ latitude[0] = tok.get_int()
204
+ t = tok.get_string()
205
+ if t.isdigit():
206
+ latitude[1] = int(t)
207
+ t = tok.get_string()
208
+ if "." in t:
209
+ (seconds, milliseconds) = t.split(".")
210
+ if not seconds.isdigit():
211
+ raise dns.exception.SyntaxError("bad latitude seconds value")
212
+ latitude[2] = int(seconds)
213
+ l = len(milliseconds)
214
+ if l == 0 or l > 3 or not milliseconds.isdigit():
215
+ raise dns.exception.SyntaxError("bad latitude milliseconds value")
216
+ if l == 1:
217
+ m = 100
218
+ elif l == 2:
219
+ m = 10
220
+ else:
221
+ m = 1
222
+ latitude[3] = m * int(milliseconds)
223
+ t = tok.get_string()
224
+ elif t.isdigit():
225
+ latitude[2] = int(t)
226
+ t = tok.get_string()
227
+ if t == "S":
228
+ latitude[4] = -1
229
+ elif t != "N":
230
+ raise dns.exception.SyntaxError("bad latitude hemisphere value")
231
+
232
+ longitude[0] = tok.get_int()
233
+ t = tok.get_string()
234
+ if t.isdigit():
235
+ longitude[1] = int(t)
236
+ t = tok.get_string()
237
+ if "." in t:
238
+ (seconds, milliseconds) = t.split(".")
239
+ if not seconds.isdigit():
240
+ raise dns.exception.SyntaxError("bad longitude seconds value")
241
+ longitude[2] = int(seconds)
242
+ l = len(milliseconds)
243
+ if l == 0 or l > 3 or not milliseconds.isdigit():
244
+ raise dns.exception.SyntaxError("bad longitude milliseconds value")
245
+ if l == 1:
246
+ m = 100
247
+ elif l == 2:
248
+ m = 10
249
+ else:
250
+ m = 1
251
+ longitude[3] = m * int(milliseconds)
252
+ t = tok.get_string()
253
+ elif t.isdigit():
254
+ longitude[2] = int(t)
255
+ t = tok.get_string()
256
+ if t == "W":
257
+ longitude[4] = -1
258
+ elif t != "E":
259
+ raise dns.exception.SyntaxError("bad longitude hemisphere value")
260
+
261
+ t = tok.get_string()
262
+ if t[-1] == "m":
263
+ t = t[0:-1]
264
+ altitude = float(t) * 100.0 # m -> cm
265
+
266
+ tokens = tok.get_remaining(max_tokens=3)
267
+ if len(tokens) >= 1:
268
+ value = tokens[0].unescape().value
269
+ if value[-1] == "m":
270
+ value = value[0:-1]
271
+ size = float(value) * 100.0 # m -> cm
272
+ if len(tokens) >= 2:
273
+ value = tokens[1].unescape().value
274
+ if value[-1] == "m":
275
+ value = value[0:-1]
276
+ hprec = float(value) * 100.0 # m -> cm
277
+ if len(tokens) >= 3:
278
+ value = tokens[2].unescape().value
279
+ if value[-1] == "m":
280
+ value = value[0:-1]
281
+ vprec = float(value) * 100.0 # m -> cm
282
+
283
+ # Try encoding these now so we raise if they are bad
284
+ _encode_size(size, "size")
285
+ _encode_size(hprec, "horizontal precision")
286
+ _encode_size(vprec, "vertical precision")
287
+
288
+ return cls(rdclass, rdtype, latitude, longitude, altitude, size, hprec, vprec)
289
+
290
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
291
+ milliseconds = (
292
+ self.latitude[0] * 3600000
293
+ + self.latitude[1] * 60000
294
+ + self.latitude[2] * 1000
295
+ + self.latitude[3]
296
+ ) * self.latitude[4]
297
+ latitude = 0x80000000 + milliseconds
298
+ milliseconds = (
299
+ self.longitude[0] * 3600000
300
+ + self.longitude[1] * 60000
301
+ + self.longitude[2] * 1000
302
+ + self.longitude[3]
303
+ ) * self.longitude[4]
304
+ longitude = 0x80000000 + milliseconds
305
+ altitude = int(self.altitude) + 10000000
306
+ size = _encode_size(self.size, "size")
307
+ hprec = _encode_size(self.horizontal_precision, "horizontal precision")
308
+ vprec = _encode_size(self.vertical_precision, "vertical precision")
309
+ wire = struct.pack(
310
+ "!BBBBIII", 0, size, hprec, vprec, latitude, longitude, altitude
311
+ )
312
+ file.write(wire)
313
+
314
+ @classmethod
315
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
316
+ (
317
+ version,
318
+ size,
319
+ hprec,
320
+ vprec,
321
+ latitude,
322
+ longitude,
323
+ altitude,
324
+ ) = parser.get_struct("!BBBBIII")
325
+ if version != 0:
326
+ raise dns.exception.FormError("LOC version not zero")
327
+ if latitude < _MIN_LATITUDE or latitude > _MAX_LATITUDE:
328
+ raise dns.exception.FormError("bad latitude")
329
+ if latitude > 0x80000000:
330
+ latitude = (latitude - 0x80000000) / 3600000
331
+ else:
332
+ latitude = -1 * (0x80000000 - latitude) / 3600000
333
+ if longitude < _MIN_LONGITUDE or longitude > _MAX_LONGITUDE:
334
+ raise dns.exception.FormError("bad longitude")
335
+ if longitude > 0x80000000:
336
+ longitude = (longitude - 0x80000000) / 3600000
337
+ else:
338
+ longitude = -1 * (0x80000000 - longitude) / 3600000
339
+ altitude = float(altitude) - 10000000.0
340
+ size = _decode_size(size, "size")
341
+ hprec = _decode_size(hprec, "horizontal precision")
342
+ vprec = _decode_size(vprec, "vertical precision")
343
+ return cls(rdclass, rdtype, latitude, longitude, altitude, size, hprec, vprec)
344
+
345
+ @property
346
+ def float_latitude(self):
347
+ "latitude as a floating point value"
348
+ return _tuple_to_float(self.latitude)
349
+
350
+ @property
351
+ def float_longitude(self):
352
+ "longitude as a floating point value"
353
+ return _tuple_to_float(self.longitude)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/LP.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ import struct
4
+
5
+ import dns.immutable
6
+ import dns.rdata
7
+
8
+
9
+ @dns.immutable.immutable
10
+ class LP(dns.rdata.Rdata):
11
+ """LP record"""
12
+
13
+ # see: rfc6742.txt
14
+
15
+ __slots__ = ["preference", "fqdn"]
16
+
17
+ def __init__(self, rdclass, rdtype, preference, fqdn):
18
+ super().__init__(rdclass, rdtype)
19
+ self.preference = self._as_uint16(preference)
20
+ self.fqdn = self._as_name(fqdn)
21
+
22
+ def to_text(self, origin=None, relativize=True, **kw):
23
+ fqdn = self.fqdn.choose_relativity(origin, relativize)
24
+ return "%d %s" % (self.preference, fqdn)
25
+
26
+ @classmethod
27
+ def from_text(
28
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
29
+ ):
30
+ preference = tok.get_uint16()
31
+ fqdn = tok.get_name(origin, relativize, relativize_to)
32
+ return cls(rdclass, rdtype, preference, fqdn)
33
+
34
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
35
+ file.write(struct.pack("!H", self.preference))
36
+ self.fqdn.to_wire(file, compress, origin, canonicalize)
37
+
38
+ @classmethod
39
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
40
+ preference = parser.get_uint16()
41
+ fqdn = parser.get_name(origin)
42
+ return cls(rdclass, rdtype, preference, fqdn)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/MX.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.mxbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class MX(dns.rdtypes.mxbase.MXBase):
24
+ """MX record"""
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/NID.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ import struct
4
+
5
+ import dns.immutable
6
+ import dns.rdtypes.util
7
+
8
+
9
+ @dns.immutable.immutable
10
+ class NID(dns.rdata.Rdata):
11
+ """NID record"""
12
+
13
+ # see: rfc6742.txt
14
+
15
+ __slots__ = ["preference", "nodeid"]
16
+
17
+ def __init__(self, rdclass, rdtype, preference, nodeid):
18
+ super().__init__(rdclass, rdtype)
19
+ self.preference = self._as_uint16(preference)
20
+ if isinstance(nodeid, bytes):
21
+ if len(nodeid) != 8:
22
+ raise ValueError("invalid nodeid")
23
+ self.nodeid = dns.rdata._hexify(nodeid, 4, b":")
24
+ else:
25
+ dns.rdtypes.util.parse_formatted_hex(nodeid, 4, 4, ":")
26
+ self.nodeid = nodeid
27
+
28
+ def to_text(self, origin=None, relativize=True, **kw):
29
+ return f"{self.preference} {self.nodeid}"
30
+
31
+ @classmethod
32
+ def from_text(
33
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
34
+ ):
35
+ preference = tok.get_uint16()
36
+ nodeid = tok.get_identifier()
37
+ return cls(rdclass, rdtype, preference, nodeid)
38
+
39
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
40
+ file.write(struct.pack("!H", self.preference))
41
+ file.write(dns.rdtypes.util.parse_formatted_hex(self.nodeid, 4, 4, ":"))
42
+
43
+ @classmethod
44
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
45
+ preference = parser.get_uint16()
46
+ nodeid = parser.get_remaining()
47
+ return cls(rdclass, rdtype, preference, nodeid)
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/NS.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.immutable
19
+ import dns.rdtypes.nsbase
20
+
21
+
22
+ @dns.immutable.immutable
23
+ class NS(dns.rdtypes.nsbase.NSBase):
24
+ """NS record"""
vllm/lib/python3.10/site-packages/dns/rdtypes/ANY/NSEC.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
2
+
3
+ # Copyright (C) 2004-2007, 2009-2011 Nominum, Inc.
4
+ #
5
+ # Permission to use, copy, modify, and distribute this software and its
6
+ # documentation for any purpose with or without fee is hereby granted,
7
+ # provided that the above copyright notice and this permission notice
8
+ # appear in all copies.
9
+ #
10
+ # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
11
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
13
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+
18
+ import dns.exception
19
+ import dns.immutable
20
+ import dns.name
21
+ import dns.rdata
22
+ import dns.rdatatype
23
+ import dns.rdtypes.util
24
+
25
+
26
+ @dns.immutable.immutable
27
+ class Bitmap(dns.rdtypes.util.Bitmap):
28
+ type_name = "NSEC"
29
+
30
+
31
+ @dns.immutable.immutable
32
+ class NSEC(dns.rdata.Rdata):
33
+ """NSEC record"""
34
+
35
+ __slots__ = ["next", "windows"]
36
+
37
+ def __init__(self, rdclass, rdtype, next, windows):
38
+ super().__init__(rdclass, rdtype)
39
+ self.next = self._as_name(next)
40
+ if not isinstance(windows, Bitmap):
41
+ windows = Bitmap(windows)
42
+ self.windows = tuple(windows.windows)
43
+
44
+ def to_text(self, origin=None, relativize=True, **kw):
45
+ next = self.next.choose_relativity(origin, relativize)
46
+ text = Bitmap(self.windows).to_text()
47
+ return f"{next}{text}"
48
+
49
+ @classmethod
50
+ def from_text(
51
+ cls, rdclass, rdtype, tok, origin=None, relativize=True, relativize_to=None
52
+ ):
53
+ next = tok.get_name(origin, relativize, relativize_to)
54
+ windows = Bitmap.from_text(tok)
55
+ return cls(rdclass, rdtype, next, windows)
56
+
57
+ def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
58
+ # Note that NSEC downcasing, originally mandated by RFC 4034
59
+ # section 6.2 was removed by RFC 6840 section 5.1.
60
+ self.next.to_wire(file, None, origin, False)
61
+ Bitmap(self.windows).to_wire(file)
62
+
63
+ @classmethod
64
+ def from_wire_parser(cls, rdclass, rdtype, parser, origin=None):
65
+ next = parser.get_name(origin)
66
+ bitmap = Bitmap.from_wire_parser(parser)
67
+ return cls(rdclass, rdtype, next, bitmap)