File: //home/arjun/projects/env/lib/python3.10/site-packages/dns/__pycache__/reversename.cpython-310.pyc
o
!we� � @ s� d Z ddlZddlZddlZddlZej�d�Zej�d�Z ee fde
dejjdejjdejjfd d
�Zee fdejjdejjdejjde
fdd
�Z
dS )zDNS Reverse Map Names.� Nz
in-addr.arpa.z ip6.arpa.�text� v4_origin� v6_origin�returnc C s� z,t j�| �}t j�|�rdd� |dd� D �}|}ndd� tt�|��� �D �}|}W n tyB dd� t j �| �D �}|}Y nw t j
jd�t
|��|d�S ) a� Convert an IPv4 or IPv6 address in textual form into a Name object whose
value is the reverse-map domain name of the address.
*text*, a ``str``, is an IPv4 or IPv6 address in textual form
(e.g. '127.0.0.1', '::1')
*v4_origin*, a ``dns.name.Name`` to append to the labels corresponding to
the address if the address is an IPv4 address, instead of the default
(in-addr.arpa.)
*v6_origin*, a ``dns.name.Name`` to append to the labels corresponding to
the address if the address is an IPv6 address, instead of the default
(ip6.arpa.)
Raises ``dns.exception.SyntaxError`` if the address is badly formed.
Returns a ``dns.name.Name``.
c S � g | ]}d | �qS �z%d� ��.0�byter r �H/home/arjun/projects/env/lib/python3.10/site-packages/dns/reversename.py�
<listcomp>9 � z from_address.<locals>.<listcomp>� Nc S s g | ]}|�qS r r )r
�xr r r r
<