a
àMÒe¨ ã @ s² d Z ddlZddlZG dd„ dejjƒZejejhZ G dd„ dej
jƒZe
edœdd „Zee
d
œdd„Zeed
œdd„ZejZejZejZejZejZejZejZejZejZdS )zDNS Rdata Classes.é Nc @ sd e Zd ZdZdZdZeZdZeZdZ e Z
dZdZe
dd „ ƒZe
d
d„ ƒZe
dd
„ ƒZe
dd„ ƒZdS )Ú
RdataClasszDNS Rdata Classr é é é éþ éÿ c C s dS )Niÿÿ © ©Úclsr r ú2/usr/lib/python3.9/site-packages/dns/rdataclass.pyÚ_maximum% s zRdataClass._maximumc C s dS )NÚclassr r r r r Ú_short_name) s zRdataClass._short_namec C s dS )NZCLASSr r r r r Ú_prefix- s zRdataClass._prefixc C s t S )N)ÚUnknownRdataclassr r r r Ú_unknown_exception_class1 s z#RdataClass._unknown_exception_classN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú RESERVED0ÚINÚINTERNETÚCHÚCHAOSÚHSÚHESIODÚNONEÚANYÚclassmethodr r r r r r r r r s$
r c @ s e Zd ZdZdS )r zA DNS class is unknown.N)r r r r r r r r r 9 s r )ÚtextÚreturnc C s
t | ¡S )a¦ 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``.
)r Ú from_text)r r r r r" = s r" )Úvaluer! c C s
t | ¡S )a 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``.
)r Úto_text)r# r r r r$ O s r$ )Úrdclassr! c C s | t v rdS dS )zœTrue if the specified class is a metaclass.
The currently defined metaclasses are ANY and NONE.
*rdclass* is a ``dns.rdataclass.RdataClass``.
TF)Ú_metaclasses)r% r r r Úis_metaclass] s r' )r Zdns.enumZdnsZ
dns.exceptionÚenumÚIntEnumr r r r&