/usr/lib/python3.9/site-packages/dns/__pycache__
NameSizeModeActions
asyncbackend.cpython-39.opt-1.pyc26160644editdlrm
asyncbackend.cpython-39.pyc26160644editdlrm
asyncquery.cpython-39.opt-1.pyc178050644editdlrm
asyncquery.cpython-39.pyc178170644editdlrm
asyncresolver.cpython-39.opt-1.pyc129580644editdlrm
asyncresolver.cpython-39.pyc130020644editdlrm
dnssec.cpython-39.opt-1.pyc321600644editdlrm
dnssec.cpython-39.pyc321880644editdlrm
dnssectypes.cpython-39.opt-1.pyc16160644editdlrm
dnssectypes.cpython-39.pyc16160644editdlrm
e164.cpython-39.opt-1.pyc34520644editdlrm
e164.cpython-39.pyc34520644editdlrm
edns.cpython-39.opt-1.pyc147200644editdlrm
edns.cpython-39.pyc147340644editdlrm
entropy.cpython-39.opt-1.pyc33480644editdlrm
entropy.cpython-39.pyc33480644editdlrm
enum.cpython-39.opt-1.pyc32490644editdlrm
enum.cpython-39.pyc32490644editdlrm
exception.cpython-39.opt-1.pyc55180644editdlrm
exception.cpython-39.pyc57140644editdlrm
flags.cpython-39.opt-1.pyc22080644editdlrm
flags.cpython-39.pyc22080644editdlrm
grange.cpython-39.opt-1.pyc10890644editdlrm
grange.cpython-39.pyc11330644editdlrm
immutable.cpython-39.opt-1.pyc24280644editdlrm
immutable.cpython-39.pyc24280644editdlrm
inet.cpython-39.opt-1.pyc46030644editdlrm
inet.cpython-39.pyc46030644editdlrm
ipv4.cpython-39.opt-1.pyc18440644editdlrm
ipv4.cpython-39.pyc18440644editdlrm
ipv6.cpython-39.opt-1.pyc39380644editdlrm
ipv6.cpython-39.pyc39380644editdlrm
message.cpython-39.opt-1.pyc506310644editdlrm
message.cpython-39.pyc506720644editdlrm
name.cpython-39.opt-1.pyc350740644editdlrm
name.cpython-39.pyc350890644editdlrm
namedict.cpython-39.opt-1.pyc29860644editdlrm
namedict.cpython-39.pyc29860644editdlrm
nameserver.cpython-39.opt-1.pyc89080644editdlrm
nameserver.cpython-39.pyc89080644editdlrm
node.cpython-39.opt-1.pyc116050644editdlrm
node.cpython-39.pyc116050644editdlrm
opcode.cpython-39.opt-1.pyc24750644editdlrm
opcode.cpython-39.pyc24750644editdlrm
query.cpython-39.opt-1.pyc402980644editdlrm
query.cpython-39.pyc403430644editdlrm
rcode.cpython-39.opt-1.pyc32530644editdlrm
rcode.cpython-39.pyc32530644editdlrm
rdata.cpython-39.opt-1.pyc236090644editdlrm
rdata.cpython-39.pyc236090644editdlrm
rdataclass.cpython-39.opt-1.pyc27920644editdlrm
rdataclass.cpython-39.pyc27920644editdlrm
rdataset.cpython-39.opt-1.pyc154370644editdlrm
rdataset.cpython-39.pyc154510644editdlrm
rdatatype.cpython-39.opt-1.pyc66730644editdlrm
rdatatype.cpython-39.pyc66730644editdlrm
renderer.cpython-39.opt-1.pyc98220644editdlrm
renderer.cpython-39.pyc98410644editdlrm
resolver.cpython-39.opt-1.pyc524720644editdlrm
resolver.cpython-39.pyc526250644editdlrm
reversename.cpython-39.opt-1.pyc30550644editdlrm
reversename.cpython-39.pyc30550644editdlrm
rrset.cpython-39.opt-1.pyc78850644editdlrm
rrset.cpython-39.pyc78990644editdlrm
serial.cpython-39.opt-1.pyc29330644editdlrm
serial.cpython-39.pyc29330644editdlrm
set.cpython-39.opt-1.pyc87990644editdlrm
set.cpython-39.pyc87990644editdlrm
tokenizer.cpython-39.opt-1.pyc172420644editdlrm
tokenizer.cpython-39.pyc172560644editdlrm
transaction.cpython-39.opt-1.pyc202610644editdlrm
transaction.cpython-39.pyc202610644editdlrm
tsig.cpython-39.opt-1.pyc103810644editdlrm
tsig.cpython-39.pyc103810644editdlrm
tsigkeyring.cpython-39.opt-1.pyc18350644editdlrm
tsigkeyring.cpython-39.pyc18350644editdlrm
ttl.cpython-39.opt-1.pyc16800644editdlrm
ttl.cpython-39.pyc16800644editdlrm
update.cpython-39.opt-1.pyc88860644editdlrm
update.cpython-39.pyc88860644editdlrm
version.cpython-39.opt-1.pyc5630644editdlrm
version.cpython-39.pyc5630644editdlrm
versioned.cpython-39.opt-1.pyc87230644editdlrm
versioned.cpython-39.pyc87750644editdlrm
win32util.cpython-39.opt-1.pyc56530644editdlrm
win32util.cpython-39.pyc56530644editdlrm
wire.cpython-39.opt-1.pyc33270644editdlrm
wire.cpython-39.pyc33550644editdlrm
xfr.cpython-39.opt-1.pyc77710644editdlrm
xfr.cpython-39.pyc77890644editdlrm
zone.cpython-39.opt-1.pyc452680644editdlrm
zone.cpython-39.pyc454120644editdlrm
zonefile.cpython-39.opt-1.pyc176630644editdlrm
zonefile.cpython-39.pyc176870644editdlrm
zonetypes.cpython-39.opt-1.pyc10230644editdlrm
zonetypes.cpython-39.pyc10230644editdlrm
_asyncbackend.cpython-39.opt-1.pyc42080644editdlrm
_asyncbackend.cpython-39.pyc42080644editdlrm
_asyncio_backend.cpython-39.opt-1.pyc89840644editdlrm
_asyncio_backend.cpython-39.pyc90020644editdlrm
_ddr.cpython-39.opt-1.pyc40710644editdlrm
_ddr.cpython-39.pyc40710644editdlrm
_features.cpython-39.opt-1.pyc23670644editdlrm
_features.cpython-39.pyc23670644editdlrm
_immutable_ctx.cpython-39.opt-1.pyc21590644editdlrm
_immutable_ctx.cpython-39.pyc21590644editdlrm
__init__.cpython-39.opt-1.pyc6670644editdlrm
__init__.cpython-39.pyc6670644editdlrm
Edit: /usr/lib/python3.9/site-packages/dns/__pycache__/node.cpython-39.pyc (11605B)
a àMÒew1ã@sÊdZddlZddlZddlmZmZmZddlZddl Zddl Zddl Zddl Zddl ZddlZejjhZejjejjejjhZdd„ZejGdd„dejƒƒZGdd „d ƒZejjGd d „d eƒƒZdS) z)DNS nodes. A node is a set of rdatasets.éN)ÚAnyÚDictÚOptionalcCs||vp|tjjko||vS©N)ÚdnsÚ rdatatypeZRRSIG)ZrdtypesÚrdtypeÚcovers©r ú,/usr/lib/python3.9/site-packages/dns/node.pyÚ_matches_type_or_its_signature,sr c@sReZdZdZdZdZdZeej j ej j ddœdd„ƒZ eej j ddœd d „ƒZd S) ÚNodeKindzRdatasets in nodesréé)rr ÚreturncCs.tt||ƒrtjStt||ƒr$tjStjSdSr)r Ú _cname_typesr ÚCNAMEÚ_neutral_typesÚNEUTRALÚREGULAR)Úclsrr r r r Úclassify8s   zNodeKind.classify)ÚrdatasetrcCs| |j|j¡Sr)rrr )rrr r r Úclassify_rdatasetCszNodeKind.classify_rdatasetN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrÚ classmethodrrÚ RdataTyperrÚRdatasetrr r r r r 0s þ r c@s(eZdZdZdgZdd„Zejje e e fe dœdd„Z dd „Z d d „Zd d „Zdd„Zdd„Zdd„Zejjdfejjejjejjeejjdœdd„Zejjdfejjejjejjeeejjdœdd„Zejjfejjejjejjddœdd„Zejjddœdd „Ze d!œd"d#„Z!ed!œd$d%„Z"dS)&ÚNodeaÖA Node is a set of rdatasets. A node is either a CNAME node or an "other data" node. A CNAME node contains only CNAME, KEY, NSEC, and NSEC3 rdatasets along with their covering RRSIG rdatasets. An "other data" node contains any rdataset other than a CNAME or RRSIG(CNAME) rdataset. When changes are made to a node, the CNAME or "other data" state is always consistent with the update, i.e. the most recent change wins. For example, if you have a node which contains a CNAME rdataset, and then add an MX rdataset to it, then the CNAME rdataset will be deleted. Likewise if you have a node containing an MX rdataset and add a CNAME rdataset, the MX rdataset will be deleted. Ú rdatasetscCs g|_dSr©r"©Úselfr r r Ú__init__Zsz Node.__init__)ÚnameÚkwrcKsRt ¡}|jD]2}t|ƒdkr| |j|fi|¤Ž¡| d¡q| ¡dd…S)a"Convert a node to text format. Each rdataset at the node is printed. Any keyword arguments to this method are passed on to the rdataset's to_text() method. *name*, a ``dns.name.Name``, the owner name of the rdatasets. Returns a ``str``. rÚ Néÿÿÿÿ)ÚioÚStringIOr"ÚlenÚwriteÚto_textÚgetvalue)r%r'r(ÚsÚrdsr r r r/^s    z Node.to_textcCsdtt|ƒƒdS)Nz )ÚstrÚidr$r r r Ú__repr__rsz Node.__repr__cCs<|jD]}||jvrdSq|jD]}||jvr"dSq"dS)NFTr#)r%ÚotherZrdr r r Ú__eq__us    z Node.__eq__cCs | |¡ Sr)r8)r%r7r r r Ú__ne__�sz Node.__ne__cCs t|jƒSr)r-r"r$r r r Ú__len__„sz Node.__len__cCs t|jƒSr)Úiterr"r$r r r Ú__iter__‡sz Node.__iter__cCsbt|jƒdkrRt |¡}|tjkr6dd„|jDƒ|_n|tjkrRdd„|jDƒ|_|j |¡dS)a†Append rdataset to the node with special handling for CNAME and other data conditions. Specifically, if the rdataset being appended has ``NodeKind.CNAME``, then all rdatasets other than KEY, NSEC, NSEC3, and their covering RRSIGs are deleted. If the rdataset being appended has ``NodeKind.REGULAR`` then CNAME and RRSIG(CNAME) are deleted. rcSs g|]}t |¡tjkr|‘qSr )r rr©Ú.0r2r r r Ú —sþz)Node._append_rdataset..cSs g|]}t |¡tjkr|‘qSr )r rrr=r r r r?�sþN)r-r"r rrrÚappend©r%rÚkindr r r Ú_append_rdatasetŠs   þ  þzNode._append_rdatasetF©Úrdclassrr ÚcreatercCsH|jD]}| |||¡r|Sq|s*t‚tj |||¡}| |¡|S)a*Find an rdataset matching the specified properties in the current node. *rdclass*, a ``dns.rdataclass.RdataClass``, the class of the rdataset. *rdtype*, a ``dns.rdatatype.RdataType``, the type of the rdataset. *covers*, a ``dns.rdatatype.RdataType``, the covered type. Usually this value is ``dns.rdatatype.NONE``, but if the rdtype is ``dns.rdatatype.SIG`` or ``dns.rdatatype.RRSIG``, then the covers value will be the rdata type the SIG/RRSIG covers. The library treats the SIG and RRSIG types as if they were a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA). This makes RRSIGs much easier to work with than if RRSIGs covering different rdata types were aggregated into a single RRSIG rdataset. *create*, a ``bool``. If True, create the rdataset if it is not found. Raises ``KeyError`` if an rdataset of the desired type and class does not exist and *create* is not ``True``. Returns a ``dns.rdataset.Rdataset``. )r"ÚmatchÚKeyErrorrrr rC©r%rErr rFr2r r r Ú find_rdataset¦s   zNode.find_rdatasetcCs0z| ||||¡}Wnty*d}Yn0|S)açGet an rdataset matching the specified properties in the current node. None is returned if an rdataset of the specified type and class does not exist and *create* is not ``True``. *rdclass*, an ``int``, the class of the rdataset. *rdtype*, an ``int``, the type of the rdataset. *covers*, an ``int``, the covered type. Usually this value is dns.rdatatype.NONE, but if the rdtype is dns.rdatatype.SIG or dns.rdatatype.RRSIG, then the covers value will be the rdata type the SIG/RRSIG covers. The library treats the SIG and RRSIG types as if they were a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA). This makes RRSIGs much easier to work with than if RRSIGs covering different rdata types were aggregated into a single RRSIG rdataset. *create*, a ``bool``. If True, create the rdataset if it is not found. Returns a ``dns.rdataset.Rdataset`` or ``None``. N)rJrHrIr r r Ú get_rdatasetÏs   zNode.get_rdatasetN©rErr rcCs&| |||¡}|dur"|j |¡dS)aDDelete the rdataset matching the specified properties in the current node. If a matching rdataset does not exist, it is not an error. *rdclass*, an ``int``, the class of the rdataset. *rdtype*, an ``int``, the type of the rdataset. *covers*, an ``int``, the covered type. N)rKr"Úremove)r%rErr r2r r r Údelete_rdatasetôszNode.delete_rdataset©Ú replacementrcCsNt|tjjƒstdƒ‚t|tjjƒr,| ¡}| |j |j |j ¡|  |¡dS)aÅReplace an rdataset. It is not an error if there is no rdataset matching *replacement*. Ownership of the *replacement* object is transferred to the node; in other words, this method does not store a copy of *replacement* at the node, it stores *replacement* itself. *replacement*, a ``dns.rdataset.Rdataset``. Raises ``ValueError`` if *replacement* is not a ``dns.rdataset.Rdataset``. zreplacement is not an rdatasetN) Ú isinstancerrr Ú ValueErrorZrrsetZRRsetZ to_rdatasetrNrErr rC©r%rPr r r Úreplace_rdataset s ÿzNode.replace_rdataset©rcCs4|jD]&}t |j|j¡}|tjkr|SqtjS)aTClassify a node. A node which contains a CNAME or RRSIG(CNAME) is a ``NodeKind.CNAME`` node. A node which contains only "neutral" types, i.e. types allowed to co-exist with a CNAME, is a ``NodeKind.NEUTRAL`` node. The neutral types are NSEC, NSEC3, KEY, and their associated RRSIGS. An empty node is also considered neutral. A node which contains some rdataset which is not a CNAME, RRSIG(CNAME), or a neutral type is a a ``NodeKind.REGULAR`` node. Regular nodes are also commonly referred to as "other data". )r"r rrr rrAr r r r$s    z Node.classifycCsdS)NFr r$r r r Ú is_immutable9szNode.is_immutable)#rrrrÚ __slots__r&rr'ÚNamerr4rr/r6r8r9r:r<rCrÚNONEÚ rdataclassÚ RdataClassrÚboolrr rJrrKrNrTr rrVr r r r r!HsL  ûú -û ú )üû r!csÒeZdZ‡fdd„Zejjdfejjejj ejj e ej j dœ‡fdd„ Z ejjdfejjejj ejj e eej j dœ‡fdd„ Zejjfejjejj ejj d d œd d „Zej j d d œdd„Ze dœdd„Z‡ZS)Ú ImmutableNodecs$tƒ ¡tdd„|jDƒƒ|_dS)NcSsg|]}tj |¡‘qSr )rrZImmutableRdatasetr=r r r r?Bóz*ImmutableNode.__init__..)Úsuperr&Útupler")r%Znode©Ú __class__r r r&?s ÿzImmutableNode.__init__FrDcs|r tdƒ‚tƒ |||d¡S©NÚ immutableF)Ú TypeErrorr_rJ©r%rErr rFrar r rJEszImmutableNode.find_rdatasetcs|r tdƒ‚tƒ |||d¡Src)rer_rKrfrar r rKPszImmutableNode.get_rdatasetNrLcCs tdƒ‚dS©Nrd©re)r%rErr r r r rN[szImmutableNode.delete_rdatasetrOcCs tdƒ‚dSrgrhrSr r r rTcszImmutableNode.replace_rdatasetrUcCsdS)NTr r$r r r rVfszImmutableNode.is_immutable)rrrr&rrrYrZr[rr\rr rJrrKrNrTrVÚ __classcell__r r rar r]=s8 ûúû úüû r])rÚenumr+ÚtypingrrrZ dns.immutablerZdns.nameZdns.rdataclassZ dns.rdatasetZ dns.rdatatypeZ dns.rendererZ dns.rrsetrrrZNSECZNSEC3ZKEYrr ÚuniqueÚEnumr r!rdr]r r r r Ús.ÿýv