/usr/lib/rads/venv/lib/python3.13/site-packages/dns/__pycache__
Edit: /usr/lib/rads/venv/lib/python3.13/site-packages/dns/__pycache__/inet.cpython-313.pyc (6581B)
j
S r SSKrSSKJrJrJr SSKrSSKr\R r \R r
S\S\S\
4S jrS\S\
S\4S jrS\S\4S
jrS\S\4S jrS\S\4S jr SS
\\\4 S\\ S\4S jjrS rS\S\4S jrg)z*Generic Internet address helper functions. N)AnyOptionalTuplefamilytextreturnc U [ :X a [ R R U5 $ U [ :X a [ R
R US5 $ [ e)a Convert 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)AF_INETdnsipv4 inet_atonAF_INET6ipv6NotImplementedError)r r s ;/usr/lib/rads/venv/lib/python3.13/site-packages/dns/inet.py inet_ptonr ! sF xx!!$'' 8 xx!!$--!! addressc U [ :X a [ R R U5 $ U [ :X a [ R
R U5 $ [ e)a Convert 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 inet_ntoar r r )r r s r inet_ntopr 6 sD xx!!'** 8 xx!!'**!!r c [ R R U 5 [ $ ! [ a> [ R
R U S5 [ s $ ! [ a [ ef = ff = f)zDetermine 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
Exceptionr r
ValueErrorr s r af_for_addressr K s` 4 HHtT*O s $'
A/%AA/A++A/c [ R R U 5 S nUS: =( a US:* $ ! [ a@ [ R R U S5 S nUS:H s $ ! [ a [
ef = ff = f)zIs 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 T )r r r
r r r )r firsts r is_multicastr" a s ""4(+|,, HH&&tT215EC< s! 25
A? 'A*'A?*A;;A?c [ R R U 5 g! [ a5 [ R R U S5 g! [ a gf = ff = f)zoIs the specified string an IPv4 or IPv6 address?
*text*, a ``str``, the textual address.
Returns a ``bool``.
TF)r r r
r r r s r
is_addressr$ w sY 4 HHtT* s&