Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/dns/__pycache__/node.cpython-312.pyc

172 lines
16 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
g<> iS1<00><00><><00>dZddlZddlZddlmZmZddlZddlZddl Zddl
Zddl Zddl ZejjhZejj ejj"ejj$hZd<04>Zej*Gd<05>dej,<00><00>ZGd<07>d<08>Zej2j2Gd <09>d
e<18><00>Zy) z)DNS nodes. A node is a set of rdatasets.<2E>N)<02>Any<6E>Dictc<00>T<00>||vxs#|tjjk(xr||vS<00>N)<03>dns<6E> rdatatype<70>RRSIG)<03>rdtypes<65>rdtype<70>coverss <20>7E:\Project\pygoedge\.venv\Lib\site-packages\dns/node.py<70>_matches_type_or_its_signaturer+s+<00><00> <11>W<EFBFBD> <1C> U<><16>3<EFBFBD>=<3D>=<3D>+><3E>+><3E>!><3E>!T<>6<EFBFBD>W<EFBFBD>CT<43>U<>c<00><><00>eZdZdZdZdZdZedejjdejjddfd<08><04>Z ed ejjddfd
<EFBFBD><04>Zy ) <0C>NodeKindzRdatasets in nodesr<00><00>r r <00>returnc<00><><00>tt||<02>rtjStt||<02>rtj
Stj Sr)r<00> _cname_typesr<00>CNAME<4D>_neutral_types<65>NEUTRAL<41>REGULAR)<03>clsr r s r <00>classifyzNodeKind.classify7s><00><00> *<2A>,<2C><06><06> G<><1B>><3E>><3E> !<21> +<2B>N<EFBFBD>F<EFBFBD>F<EFBFBD> K<><1B>#<23>#<23> #<23><1B>#<23>#<23> #r<00>rdatasetc<00>N<00>|j|j|j<00>Sr)rr r )rrs r <00>classify_rdatasetzNodeKind.classify_rdatasetBs<00><00><12>|<7C>|<7C>H<EFBFBD>O<EFBFBD>O<EFBFBD>X<EFBFBD>_<EFBFBD>_<EFBFBD>=<3D>=rN)<0F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrr<00> classmethodrr<00> RdataTyperr<00>Rdatasetr<00>rr rr/s~<00><00><1C><0F>G<EFBFBD><0F>G<EFBFBD> <0A>E<EFBFBD><10>$<24><18>]<5D>]<5D>,<2C>,<2C>$<24>69<36>m<EFBFBD>m<EFBFBD>6M<36>6M<36>$<24> <13>$<24><11>$<24><11>><3E><13><1C><1C>)><3E>)><3E>><3E>:<3A>><3E><11>>rrc <00>l<00>eZdZdZdgZd<03>Zdejjde e
e fde
fd<07>Z d<08>Z d <09>Zd
<EFBFBD>Zd <0B>Zd <0C>Zd <0A>Zej&j(dfdej*j,dej&j.dej&j.dedej2j4f
d<13>Zej&j(dfdej*j,dej&j.dej&j.dedej2j4dzf
d<15>Zej&j(fdej*j,dej&j.dej&j.ddfd<16>Zdej2j4ddfd<18>Zdefd<19>Z defd<1A>Z!y)<1B>Nodea<65>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.
<20> rdatasetsc<00><00>g|_yr<00>r*<00><01>selfs r <00>__init__z Node.__init__Ys <00><00><1B><04>r<00>name<6D>kwrc <00><><00>tj<00>}|jD]D}t|<04>dkDs<01>|j |j
|fi|<02><01><01>|j d<02><00>F|j <00>ddS)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<00>
N<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<07>io<69>StringIOr*<00>len<65>write<74>to_text<78>getvalue)r.r0r1<00>s<>rdss r r9z Node.to_text]sd<00><00> <0F>K<EFBFBD>K<EFBFBD>M<EFBFBD><01><17>><3E>><3E>C<EFBFBD><12>3<EFBFBD>x<EFBFBD>!<21>|<7C><11><07><07> <0B><03> <0B> <0B>D<EFBFBD>/<2F>B<EFBFBD>/<2F>0<><11><07><07><04> <0A>"<22><11>z<EFBFBD>z<EFBFBD>|<7C>C<EFBFBD>R<EFBFBD> <20> rc<00>6<00>dtt|<00><00>zdzS)Nz
<DNS node <20>>)<02>str<74>idr-s r <00>__repr__z Node.__repr__qs<00><00><1B>c<EFBFBD>"<22>T<EFBFBD>(<28>m<EFBFBD>+<2B>c<EFBFBD>1<>1rc<00><><00>|jD]}||jvs<01>y|jD]}||jvs<01>yy)NFTr,)r.<00>other<65>rds r <00>__eq__z Node.__eq__tsE<00><00><17>.<2E>.<2E>B<EFBFBD><11><15><1F><1F>(<28><1C>!<21><18>/<2F>/<2F>B<EFBFBD><11><14><1E><1E>'<27><1C>"<22>rc<00>&<00>|j|<01> Sr)rE)r.rCs r <00>__ne__z Node.__ne__<5F>s<00><00><17>;<3B>;<3B>u<EFBFBD>%<25>%<25>%rc<00>,<00>t|j<00>Sr)r7r*r-s r <00>__len__z Node.__len__<5F>s<00><00><12>4<EFBFBD>><3E>><3E>"<22>"rc<00>,<00>t|j<00>Sr)<02>iterr*r-s r <00>__iter__z Node.__iter__<5F>s<00><00><13>D<EFBFBD>N<EFBFBD>N<EFBFBD>#<23>#rc<00>
<00>t|j<00>dkDr<>tj|<01>}|tjk(rF|jD<00>cgc]*}tj|<03>tj
k7r|<03><02>,c}|_nX|tj
k(rE|jD<00>cgc]*}tj|<03>tjk7r|<03><02>,c}|_|jj |<01>ycc}wcc}w)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.
rN)r7r*rrrr<00>append)r.r<00>kindr<s r <00>_append_rdatasetzNode._append_rdataset<65>s<><00><00> <0F>t<EFBFBD>~<7E>~<7E> <1E><11> "<22><1B>-<2D>-<2D>h<EFBFBD>7<>D<EFBFBD><13>x<EFBFBD>~<7E>~<7E>%<25> $<24>~<7E>~<7E>"<12>-<2D><03><1F>1<>1<>#<23>6<>(<28>:J<>:J<>J<><18>-<2D>"<12><04><0E>
<16><18>)<29>)<29>)<29> $<24>~<7E>~<7E>"<12>-<2D><03><1F>1<>1<>#<23>6<>(<28>.<2E>.<2E>H<><18>-<2D>"<12><04><0E> <0A><0E><0E><1D><1D>h<EFBFBD>'<27><>"<12><> "s <00>/C;<04>(/DF<>rdclassr r <00>createc<00><><00>|jD]}|j|||<03>s<01>|cS|st<00>tjj |||<03>}|j |<05>|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*<00>match<63>KeyErrorrrr&rP<00>r.rQr r rRr<s r <00> find_rdatasetzNode.find_rdataset<65>s]<00><00>@<18>><3E>><3E>C<EFBFBD><12>y<EFBFBD>y<EFBFBD><17>&<26>&<26>1<><1A>
<EFBFBD>"<22><16><1A>N<EFBFBD><11>l<EFBFBD>l<EFBFBD>#<23>#<23>G<EFBFBD>V<EFBFBD>V<EFBFBD><<3C><03> <0C><1D><1D>c<EFBFBD>"<22><12>
rNc<00>T<00> |j||||<04>}|S#t$rd}Y|SwxYw)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)rWrUrVs r <00> get_rdatasetzNode.get_rdataset<65>s?<00><00>> <17><16>$<24>$<24>W<EFBFBD>f<EFBFBD>f<EFBFBD>f<EFBFBD>E<>C<EFBFBD><13>
<EFBFBD><EFBFBD><18> <17><16>C<EFBFBD><12>
<EFBFBD> <17>s <00><00> '<03>'c<00>f<00>|j|||<03>}|<04>|jj|<04>yy)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)rYr*<00>remove)r.rQr r r<s r <00>delete_rdatasetzNode.delete_rdataset<65>s4<00><00>$<13><1F><1F><07><16><16>8<><03> <0E>?<3F> <10>N<EFBFBD>N<EFBFBD> !<21> !<21>#<23> &<26> r<00> replacementc<00>N<00>t|tjj<00>s t d<01><00>t|tj
j <00>r|j<00>}|j|j|j|j<00>|j|<01>y)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) <0A>
isinstancerrr&<00>
ValueError<EFBFBD>rrset<65>RRset<65> to_rdatasetr\rQr r rP<00>r.r]s r <00>replace_rdatasetzNode.replace_rdataset s}<00><00><1A>+<2B>s<EFBFBD>|<7C>|<7C>'<<3C>'<<3C>=<3D><1C>=<3D>><3E> ><3E> <15>k<EFBFBD>3<EFBFBD>9<EFBFBD>9<EFBFBD>?<3F>?<3F> 3<>&<26>1<>1<>3<>K<EFBFBD> <0C><1C><1C> <17> <1F> <1F><1B>!3<>!3<>[<5B>5G<35>5G<35>
<EFBFBD> <0A><1D><1D>k<EFBFBD>*rc<00><><00>|jD]C}tj|j|j<00>}|tj
k7s<01>A|cStj
S)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*rrr r r)r.rrOs r rz Node.classify#sM<00><00><1D><0E><0E>H<EFBFBD><1B>$<24>$<24>X<EFBFBD>_<EFBFBD>_<EFBFBD>h<EFBFBD>o<EFBFBD>o<EFBFBD>F<>D<EFBFBD><13>x<EFBFBD>'<27>'<27>'<27><1B> <0B>'<27><18><1F><1F>rc<00><00>y)NFr'r-s r <00> is_immutablezNode.is_immutable8s<00><00>r)"r r!r"r#<00> __slots__r/rr0<00>Namerr?rr9rArErGrIrLrPr<00>NONE<4E>
rdataclass<EFBFBD>
RdataClassr%<00>boolrr&rWrYr\rerrrhr'rr r)r)Gs<><00><00> <08><1D> <0A>I<EFBFBD><1C>!<21>C<EFBFBD>H<EFBFBD>H<EFBFBD>M<EFBFBD>M<EFBFBD>!<21><14>c<EFBFBD>3<EFBFBD>h<EFBFBD><1E>!<21>C<EFBFBD>!<21>(2<>
<14>&<26>#<23>$<24>(<28>@+.<2E>-<2D>-<2D>*<<3C>*<<3C><1C> '<13><14><1E><1E>*<2A>*<2A>'<13><14> <0A> <0A>'<27>'<27>'<13><14> <0A> <0A>'<27>'<27> '<13>
<15> '<13>
<0A><1C><1C> <1E> <1E> '<13>Z+.<2E>-<2D>-<2D>*<<3C>*<<3C><1C> #<13><14><1E><1E>*<2A>*<2A>#<13><14> <0A> <0A>'<27>'<27>#<13><14> <0A> <0A>'<27>'<27> #<13>
<15> #<13>
<0A><1C><1C> <1E> <1E><14> %<25> #<13>R+.<2E>-<2D>-<2D>*<<3C>*<<3C> '<27><14><1E><1E>*<2A>*<2A>'<27><14> <0A> <0A>'<27>'<27>'<27><14> <0A> <0A>'<27>'<27> '<27>
<0E> '<27>,+<2B>C<EFBFBD>L<EFBFBD>L<EFBFBD>,A<>,A<>+<2B>d<EFBFBD>+<2B>4 <20>(<28> <20>*<15>d<EFBFBD>rr)c <00><00><00>eZdZ<02>fd<01>Zej
j dfdejjdej
jdej
jde
dejjf
<EFBFBD>fd<08> Z ej
j dfdejjdej
jdej
jde
dejjd zf
<EFBFBD>fd
<EFBFBD> Zej
j fdejjdej
jdej
jdd fd <0B>Zd ejjdd fd <0A>Zde
fd<0E>Z<11>xZS)<0F> ImmutableNodec<00><><00><01>t<00>|<00><00>t|jD<00>cgc]!}tj
j |<02><00><02>#c}<02>|_ycc}wr)<07>superr/<00>tupler*rr<00>ImmutableRdataset)r.<00>noder<<00> __class__s <20>r r/zImmutableNode.__init__>sB<00><><00> <0A><07><18><1A><1E><@<40>N<EFBFBD>N<EFBFBD> K<>N<EFBFBD>S<EFBFBD>S<EFBFBD>\<5C>\<5C> +<2B> +<2B>C<EFBFBD> 0<>N<EFBFBD> K<>
<EFBFBD><04><0E><> Ks<00>&AFrQr r rRrc<00>B<00><01>|r td<01><00>t<00>|<00> |||d<02>S<00>N<> immutableF)<03> TypeErrorrrrW<00>r.rQr r rRrvs <20>r rWzImmutableNode.find_rdatasetDs)<00><><00> <12><1B>K<EFBFBD>(<28> (<28><14>w<EFBFBD>$<24>W<EFBFBD>f<EFBFBD>f<EFBFBD>e<EFBFBD>D<>DrNc<00>B<00><01>|r td<01><00>t<00>|<00> |||d<02>Srx)rzrrrYr{s <20>r rYzImmutableNode.get_rdatasetOs)<00><><00> <12><1B>K<EFBFBD>(<28> (<28><14>w<EFBFBD>#<23>G<EFBFBD>V<EFBFBD>V<EFBFBD>U<EFBFBD>C<>Crc<00><00>td<01><00><01>Nry<00>rz)r.rQr r s r r\zImmutableNode.delete_rdatasetZs<00><00> <18> <0B>$<24>$rr]c<00><00>td<01><00>r~rrds r rezImmutableNode.replace_rdatasetbs <00><00><17> <0B>$<24>$rc<00><00>y)NTr'r-s r rhzImmutableNode.is_immutablees<00><00>r)r r!r"r/rrrkrlrmr%rnrr&rWrYr\rerh<00> __classcell__)rvs@r rprp<sx<00><><00>
<EFBFBD>+.<2E>-<2D>-<2D>*<<3C>*<<3C><1C> E<01><14><1E><1E>*<2A>*<2A> E<01><14> <0A> <0A>'<27>'<27> E<01><14> <0A> <0A>'<27>'<27> E<01>
<15> E<01>
<0A><1C><1C> <1E> <1E> E<01>+.<2E>-<2D>-<2D>*<<3C>*<<3C><1C> D<01><14><1E><1E>*<2A>*<2A> D<01><14> <0A> <0A>'<27>'<27> D<01><14> <0A> <0A>'<27>'<27> D<01>
<15> D<01>
<0A><1C><1C> <1E> <1E><14> %<25> D<01>+.<2E>-<2D>-<2D>*<<3C>*<<3C> %<25><14><1E><1E>*<2A>*<2A>%<25><14> <0A> <0A>'<27>'<27>%<25><14> <0A> <0A>'<27>'<27> %<25>
<0E> %<25>%<25>C<EFBFBD>L<EFBFBD>L<EFBFBD>,A<>,A<>%<25>d<EFBFBD>%<25><14>d<EFBFBD>rrp)r#<00>enumr5<00>typingrr<00> dns.immutabler<00>dns.name<6D>dns.rdataclass<73> dns.rdataset<65> dns.rdatatype<70> dns.rrsetrrr<00>NSEC<45>NSEC3<43>KEYrr<00>unique<75>Enumrr)ryrpr'rr <00><module>r<>s<><00><01>$0<> <0B> <09><1C><14><0F><15><13><14><10><08>M<EFBFBD>M<EFBFBD><17><17><02> <0C> <08>M<EFBFBD>M<EFBFBD><16><16><07>M<EFBFBD>M<EFBFBD><17><17><07>M<EFBFBD>M<EFBFBD><15><15><02><0E>V<01><06><1B><1B>><3E>t<EFBFBD>y<EFBFBD>y<EFBFBD>><3E> <0A>><3E>.r<15>r<15>j<05><1D><1D><18><18>)<14>D<EFBFBD>)<14><19>)r