$59 GRAYBYTE WORDPRESS FILE MANAGER $27

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.174
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/hc_python/lib/python3.12/site-packages/dns/

HOME
Current File : /opt/hc_python/lib/python3.12/site-packages/dns//rdataclass.py
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license

# Copyright (C) 2001-2017 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

"""DNS Rdata Classes."""

import dns.enum
import dns.exception


class RdataClass(dns.enum.IntEnum):
    """DNS Rdata Class"""

    RESERVED0 = 0
    IN = 1
    INTERNET = IN
    CH = 3
    CHAOS = CH
    HS = 4
    HESIOD = HS
    NONE = 254
    ANY = 255

    @classmethod
    def _maximum(cls):
        return 65535

    @classmethod
    def _short_name(cls):
        return "class"

    @classmethod
    def _prefix(cls):
        return "CLASS"

    @classmethod
    def _unknown_exception_class(cls):
        return UnknownRdataclass


_metaclasses = {RdataClass.NONE, RdataClass.ANY}


class UnknownRdataclass(dns.exception.DNSException):
    """A DNS class is unknown."""


def from_text(text: str) -> RdataClass:
    """Convert text into a DNS rdata class value.

    The input text can be a defined DNS RR class mnemonic or
    instance of the DNS generic class syntax.

    For example, "IN" and "CLASS1" will both result in a value of 1.

    Raises ``dns.rdatatype.UnknownRdataclass`` if the class is unknown.

    Raises ``ValueError`` if the rdata class value is not >= 0 and <= 65535.

    Returns a ``dns.rdataclass.RdataClass``.
    """

    return RdataClass.from_text(text)


def to_text(value: RdataClass) -> str:
    """Convert a DNS rdata class value to text.

    If the value has a known mnemonic, it will be used, otherwise the
    DNS generic class syntax will be used.

    Raises ``ValueError`` if the rdata class value is not >= 0 and <= 65535.

    Returns a ``str``.
    """

    return RdataClass.to_text(value)


def is_metaclass(rdclass: RdataClass) -> bool:
    """True if the specified class is a metaclass.

    The currently defined metaclasses are ANY and NONE.

    *rdclass* is a ``dns.rdataclass.RdataClass``.
    """

    if rdclass in _metaclasses:
        return True
    return False


### BEGIN generated RdataClass constants

RESERVED0 = RdataClass.RESERVED0
IN = RdataClass.IN
INTERNET = RdataClass.INTERNET
CH = RdataClass.CH
CHAOS = RdataClass.CHAOS
HS = RdataClass.HS
HESIOD = RdataClass.HESIOD
NONE = RdataClass.NONE
ANY = RdataClass.ANY

### END generated RdataClass constants


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Dec 2025 9.30 AM
root / root
0755
__pycache__
--
4 Apr 2025 8.03 AM
root / root
0755
dnssecalgs
--
4 Apr 2025 8.03 AM
root / root
0755
quic
--
4 Apr 2025 8.03 AM
root / root
0755
rdtypes
--
4 Apr 2025 8.03 AM
root / root
0755
__init__.py
1.624 KB
4 Apr 2025 8.03 AM
root / root
0644
_asyncbackend.py
2.34 KB
4 Apr 2025 8.03 AM
root / root
0644
_asyncio_backend.py
8.839 KB
4 Apr 2025 8.03 AM
root / root
0644
_ddr.py
5.124 KB
4 Apr 2025 8.03 AM
root / root
0644
_features.py
2.434 KB
4 Apr 2025 8.03 AM
root / root
0644
_immutable_ctx.py
2.401 KB
4 Apr 2025 8.03 AM
root / root
0644
_trio_backend.py
8.274 KB
4 Apr 2025 8.03 AM
root / root
0644
asyncbackend.py
2.73 KB
4 Apr 2025 8.03 AM
root / root
0644
asyncquery.py
30.099 KB
4 Apr 2025 8.03 AM
root / root
0644
asyncresolver.py
17.434 KB
4 Apr 2025 8.03 AM
root / root
0644
dnssec.py
40.739 KB
4 Apr 2025 8.03 AM
root / root
0644
dnssectypes.py
1.757 KB
4 Apr 2025 8.03 AM
root / root
0644
e164.py
3.885 KB
4 Apr 2025 8.03 AM
root / root
0644
edns.py
16.688 KB
4 Apr 2025 8.03 AM
root / root
0644
entropy.py
4.143 KB
4 Apr 2025 8.03 AM
root / root
0644
enum.py
3.604 KB
4 Apr 2025 8.03 AM
root / root
0644
exception.py
5.813 KB
4 Apr 2025 8.03 AM
root / root
0644
flags.py
2.686 KB
4 Apr 2025 8.03 AM
root / root
0644
grange.py
2.094 KB
4 Apr 2025 8.03 AM
root / root
0644
immutable.py
1.97 KB
4 Apr 2025 8.03 AM
root / root
0644
inet.py
5.637 KB
4 Apr 2025 8.03 AM
root / root
0644
ipv4.py
2.492 KB
4 Apr 2025 8.03 AM
root / root
0644
ipv6.py
6.4 KB
4 Apr 2025 8.03 AM
root / root
0644
message.py
66.587 KB
4 Apr 2025 8.03 AM
root / root
0644
name.py
41.775 KB
4 Apr 2025 8.03 AM
root / root
0644
namedict.py
3.906 KB
4 Apr 2025 8.03 AM
root / root
0644
nameserver.py
9.878 KB
4 Apr 2025 8.03 AM
root / root
0644
node.py
12.366 KB
4 Apr 2025 8.03 AM
root / root
0644
opcode.py
2.666 KB
4 Apr 2025 8.03 AM
root / root
0644
py.typed
0 KB
4 Apr 2025 8.03 AM
root / root
0644
query.py
54.979 KB
4 Apr 2025 8.03 AM
root / root
0644
rcode.py
4.059 KB
4 Apr 2025 8.03 AM
root / root
0644
rdata.py
30.295 KB
4 Apr 2025 8.03 AM
root / root
0644
rdataclass.py
2.914 KB
4 Apr 2025 8.03 AM
root / root
0644
rdataset.py
16.273 KB
4 Apr 2025 8.03 AM
root / root
0644
rdatatype.py
7.273 KB
4 Apr 2025 8.03 AM
root / root
0644
renderer.py
10.99 KB
4 Apr 2025 8.03 AM
root / root
0644
resolver.py
72.002 KB
4 Apr 2025 8.03 AM
root / root
0644
reversename.py
3.738 KB
4 Apr 2025 8.03 AM
root / root
0644
rrset.py
8.955 KB
4 Apr 2025 8.03 AM
root / root
0644
serial.py
3.521 KB
4 Apr 2025 8.03 AM
root / root
0644
set.py
8.997 KB
4 Apr 2025 8.03 AM
root / root
0644
tokenizer.py
23.03 KB
4 Apr 2025 8.03 AM
root / root
0644
transaction.py
22.06 KB
4 Apr 2025 8.03 AM
root / root
0644
tsig.py
11.146 KB
4 Apr 2025 8.03 AM
root / root
0644
tsigkeyring.py
2.571 KB
4 Apr 2025 8.03 AM
root / root
0644
ttl.py
2.907 KB
4 Apr 2025 8.03 AM
root / root
0644
update.py
11.956 KB
4 Apr 2025 8.03 AM
root / root
0644
version.py
1.881 KB
4 Apr 2025 8.03 AM
root / root
0644
versioned.py
11.489 KB
4 Apr 2025 8.03 AM
root / root
0644
win32util.py
8.666 KB
4 Apr 2025 8.03 AM
root / root
0644
wire.py
2.764 KB
4 Apr 2025 8.03 AM
root / root
0644
xfr.py
12.96 KB
4 Apr 2025 8.03 AM
root / root
0644
zone.py
50.865 KB
4 Apr 2025 8.03 AM
root / root
0644
zonefile.py
27.271 KB
4 Apr 2025 8.03 AM
root / root
0644
zonetypes.py
0.674 KB
4 Apr 2025 8.03 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF