|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /lib/python3.6/site-packages/dns/__pycache__/ |
3
�b�W� � @ s4 d Z ddlZddlZddlmZ dd� Zdd� ZdS ) zIPv4 helper functions.� N� )�binary_typec C sJ t | �dkrtjj�t| t�s&t| �} d| d | d | d | d f j� S )z�Convert an IPv4 address in network form to text form.
@param address: The IPv4 address
@type address: string
@returns: string
� z%u.%u.%u.%ur r � � )�len�dns� exception�SyntaxError�
isinstance� bytearray�encode)Zaddress� r �/usr/lib/python3.6/ipv4.py� inet_ntoa s
r c C s� t | t�s| j� } | jd�}t|�dkr0tjj�x<|D ]4}|j� sJtjj�t|�dkr6|d dkr6tjj�q6W ydd� |D �}t j
d
|�� S tjj�Y nX d S )z�Convert an IPv4 address in text form to network form.
@param text: The IPv4 address
@type text: string
@returns: string
� .r r r �0c S s g | ]}t |��qS r )�int)�.0�partr r r �
<listcomp>8 s zinet_aton.<locals>.<listcomp>�BBBBN)r )r r r
�splitr r r r
�isdigit�struct�pack)�text�partsr �bytesr r r � inet_aton% s
r )�__doc__r Z
dns.exceptionr Z_compatr r r r r r r �<module> s