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

82 lines
6.5 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
g<> iy<00><00><><00>dZddlZddlmZmZddlZddlZejZejZ de
de de fd<07>Z de
de de fd <09>Zde de
fd
<EFBFBD>Zde defd <0B>Zde defd <0C>Zdd ee e
fde
dzdefd<0F>Zd<10>Zde de fd<11>Zy)z*Generic Internet address helper functions.<2E>N)<02>Any<6E>Tuple<6C>family<6C>text<78>returnc<00><><00>|tk(rtjj|<01>S|tk(r tj
j|d<01>St <00>)aConvert the textual form of a network address into its binary form.
*family* is an ``int``, the address family.
*text* is a ``str``, the textual address.
Raises ``NotImplementedError`` if the address family specified is not
implemented.
Returns a ``bytes``.
T)<07>AF_INET<45>dns<6E>ipv4<76> inet_aton<6F>AF_INET6<54>ipv6<76>NotImplementedError)rrs <20>7E:\Project\pygoedge\.venv\Lib\site-packages\dns/inet.py<70> inet_ptonr!sF<00><00><0E><17><18><12>x<EFBFBD>x<EFBFBD>!<21>!<21>$<24>'<27>'<27> <0F>8<EFBFBD> <1B><12>x<EFBFBD>x<EFBFBD>!<21>!<21>$<24><04>-<2D>-<2D>!<21>!<21><00>addressc<00><><00>|tk(rtjj|<01>S|tk(rtj
j|<01>St <00>)a0Convert the binary form of a network address into its textual form.
*family* is an ``int``, the address family.
*address* is a ``bytes``, the network address in binary form.
Raises ``NotImplementedError`` if the address family specified is not
implemented.
Returns a ``str``.
)r r
r <00> inet_ntoar rr)rrs r<00> inet_ntopr6sD<00><00><0E><17><18><12>x<EFBFBD>x<EFBFBD>!<21>!<21>'<27>*<2A>*<2A> <0F>8<EFBFBD> <1B><12>x<EFBFBD>x<EFBFBD>!<21>!<21>'<27>*<2A>*<2A>!<21>!rc<00><><00> tjj|<00>tS#t$r= tj
j|d<01>t cYS#t$rt<00>wxYwwxYw)z<>Determine the address family of a textual-form network address.
*text*, a ``str``, the textual address.
Raises ``ValueError`` if the address family cannot be determined
from the input.
Returns an ``int``.
T)r
r r r <00> Exceptionrr <00>
ValueError<EFBFBD>rs r<00>af_for_addressrKs`<00><00><1D> <0B><08><08><1A><1A>4<EFBFBD> <20><16><0E><> <14><1D> <1D> <0F>H<EFBFBD>H<EFBFBD> <1E> <1E>t<EFBFBD>T<EFBFBD> *<2A><1B>O<EFBFBD><4F><18> <1D><1C> <1C> <1D><> <1D>s <00>$'<00> A-<03>%A<02>A-<03>A)<05>)A-c<00><><00> tjj|<00>d}|dk\xr|dkS#t$r? tjj|d<04>d}|dk(cYS#t$rt
<00>wxYwwxYw)z<>Is the textual-form network address a multicast address?
*text*, a ``str``, the textual address.
Raises ``ValueError`` if the address family cannot be determined
from the input.
Returns a ``bool``.
r<00><><00><>T<><54>)r
r r rrr)r<00>firsts r<00> is_multicastr!as<><00><00><1D><13><08><08>"<22>"<22>4<EFBFBD>(<28><11>+<2B><05><14><03>|<7C>,<2C><05><13> <0C>,<2C><> <14><1D> <1D><17>H<EFBFBD>H<EFBFBD>&<26>&<26>t<EFBFBD>T<EFBFBD>2<>1<EFBFBD>5<>E<EFBFBD><18>C<EFBFBD><<3C> <1F><><18> <1D><1C> <1C> <1D><> <1D>s <00>-0<00> A8<03>'A$<02>!A8<03>$A4<05>4A8c<00><><00> tjj|<00>y#t$r4 tjj|d<01>Yy#t$rYYywxYwwxYw)z{Is the specified string an IPv4 or IPv6 address?
*text*, a ``str``, the textual address.
Returns a ``bool``.
TF)r
r r rrrs r<00>
is_addressr#wsY<00><00><19> <0B><08><08><1A><1A>4<EFBFBD> <20><13><> <14><19> <19> <0F>H<EFBFBD>H<EFBFBD> <1E> <1E>t<EFBFBD>T<EFBFBD> *<2A><17><><18> <19><18> <19><> <19>s&<00>"<00> A<03> A<02> A<05>A<03>A<05>A<03>
high_tuple<EFBFBD>afc<00><><00>|\}}|<01> t|<02>}|tk(r||fS|tk(rb|jd<02>}|dkr||ddfS|d|}||dzd}|j <00>r||dt |<06>fS ||dt j|<06>fStd|<01><00><02><00>#t$r2t j}t j|||<07><05>^<01>^}} }| cYSwxYw)aXGiven a "high-level" address tuple, i.e.
an (address, port) return the appropriate "low-level" address tuple
suitable for use in socket calls.
If an *af* other than ``None`` is provided, it is assumed the
address in the high-level tuple is valid and has that af. If af
is ``None``, then af_for_address will be called.
N<>%r<00>)<01>flags<67>unknown address family ) rr r <00>find<6E>isdigit<69>int<6E>socket<65>if_nametoindex<65>AttributeError<6F>AI_NUMERICHOST<53> getaddrinfor)
r$r%r<00>port<72>i<>addrpart<72>scope<70>ai_flags<67>_<>tups
r<00>low_level_address_tupler:<00>s<00><00><1F>M<EFBFBD>G<EFBFBD>T<EFBFBD> <09>z<EFBFBD> <1B>G<EFBFBD> $<24><02> <09>W<EFBFBD>}<7D><17><14><EFBFBD><1E> <0B>x<EFBFBD><1E> <13>L<EFBFBD>L<EFBFBD><13> <1D><01> <0C>q<EFBFBD>5<EFBFBD><1B>T<EFBFBD>1<EFBFBD>a<EFBFBD>(<28> (<28><1A>2<EFBFBD>A<EFBFBD>;<3B><08><17><01>A<EFBFBD><05><07> <20><05> <10>=<3D>=<3D>?<3F><1C>d<EFBFBD>A<EFBFBD>s<EFBFBD>5<EFBFBD>z<EFBFBD>2<> 2<> <17><1C>d<EFBFBD>A<EFBFBD>v<EFBFBD>'<<3C>'<<3C>U<EFBFBD>'C<>D<> D<> "<22>$;<3B>B<EFBFBD>4<EFBFBD>"@<40>A<>A<><41> <1E> <17><1D>,<2C>,<2C>H<EFBFBD>$<24>0<>0<><17>$<24>h<EFBFBD>O<>O<EFBFBD>Y<EFBFBD>q<EFBFBD>#<23><11><16>J<EFBFBD> <17>s<00>2B<00>8C<03>Cc<00>n<00>|tjk(ry|tjk(rytd|<00><00><02><00>)z:Return the 'any' address for the specified address family.z0.0.0.0z::r*)r.r r r)r%s r<00>
any_for_afr<<00>s3<00><00> <09>V<EFBFBD>^<5E>^<5E><1B><18> <0B>v<EFBFBD><EFBFBD><EFBFBD> <1E><13>
<1D> 7<><02>t<EFBFBD><<3C>
=<3D>=rc<00><><00> tjj|<00>S#t$r6 tjj|<00>cYS#t$rt
<00>wxYwwxYw)aVerify that *address* is a valid text form IPv4 or IPv6 address and return its
canonical text form. IPv6 addresses with scopes are rejected.
*text*, a ``str``, the address in textual form.
Raises ``ValueError`` if the text is not valid.
)r
r<00> canonicalizerr rrs rr>r><00>sZ<00><00><1D><12>x<EFBFBD>x<EFBFBD>$<24>$<24>T<EFBFBD>*<2A>*<2A><> <14><1D> <1D><16>8<EFBFBD>8<EFBFBD>(<28>(<28><14>.<2E> .<2E><><18> <1D><1C> <1C> <1D><><1D>s <00>!<00> A <03>A <02> A <03> A<05>A )N)<16>__doc__r.<00>typingrr<00>dns.ipv4r
<00>dns.ipv6r r r-<00>str<74>bytesrrr<00>boolr!r#r:r<r><00>rr<00><module>rGs<><00><01>$1<> <0A><1D><0F><0F>
<11>.<2E>.<2E><07> <11>?<3F>?<3F><08>"<22>c<EFBFBD>"<22><13>"<22><15>"<22>*"<22>c<EFBFBD>"<22>E<EFBFBD>"<22>c<EFBFBD>"<22>*<1D><13><1D><13><1D>,<1D>s<EFBFBD><1D>t<EFBFBD><1D>,<19>S<EFBFBD><19>T<EFBFBD><19>&B<01><05>c<EFBFBD>3<EFBFBD>h<EFBFBD><0F>B<01>S<EFBFBD>4<EFBFBD>Z<EFBFBD>B<01>SV<53>B<01>D><3E><1D>s<EFBFBD><1D>s<EFBFBD>r