HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/internet/__pycache__/address.cpython-38.pyc
U


W[~�@s4dZddlmZmZddlZddlZddlZddlmZddl	m
Z
ddlmZddlm
Z
ddlmZdd	lmZee
�ejd
d�Gdd
�d
e���Zee
�ejd
d�Gdd�de���Zee
�Gdd�de��Zejd
d�ee
�Gdd�de���Zejdddd�ee
�Gdd�de���ZGdd�de�ZdS)z*
Address objects for network connections.
�)�division�absolute_importN)�implementer)�IAddress)�_asFilesystemBytes)�_coerceToFilesystemEncoding)�platform)�_PY3T)�hashc@s8eZdZdZejej�ddg�d�Ze��Z	e��Z
dS)�IPv4Addressat
    An L{IPv4Address} represents the address of an IPv4 socket endpoint.

    @ivar type: A string describing the type of transport, either 'TCP' or
        'UDP'.

    @ivar host: A string containing a dotted-quad IPv4 address; for example,
        "127.0.0.1".
    @type host: C{str}

    @ivar port: An integer representing the port number.
    @type port: C{int}
    �TCP�UDP�Z	validatorN)�__name__�
__module__�__qualname__�__doc__�attr�ib�
validators�in_�type�host�port�rr�:/usr/lib/python3/dist-packages/twisted/internet/address.pyrs
rc@sPeZdZdZejej�ddg�d�Ze��Z	e��Z
ejdd�Zejdd�ZdS)�IPv6Addressa�
    An L{IPv6Address} represents the address of an IPv6 socket endpoint.

    @ivar type: A string describing the type of transport, either 'TCP' or
        'UDP'.

    @ivar host: A string containing a colon-separated, hexadecimal formatted
        IPv6 address; for example, "::1".
    @type host: C{str}

    @ivar port: An integer representing the port number.
    @type port: C{int}

    @ivar flowInfo: the IPv6 flow label.  This can be used by QoS routers to
        identify flows of traffic; you may generally safely ignore it.
    @type flowInfo: L{int}

    @ivar scopeID: the IPv6 scope identifier - roughly analagous to what
        interface traffic destined for this address must be transmitted over.
    @type scopeID: L{int} or L{str}
    rr
rr)�defaultN)
rrrrrrrrrrrZflowInfoZscopeIDrrrrr+src@seZdZdZdS)�_ProcessAddresszD
    An L{interfaces.IAddress} provider for process transports.
    N)rrrrrrrrrKsrc@s eZdZdZe��Ze��ZdS)�HostnameAddressa
    A L{HostnameAddress} represents the address of a L{HostnameEndpoint}.

    @ivar hostname: A hostname byte string; for example, b"example.com".
    @type hostname: L{bytes}

    @ivar port: An integer representing the port number.
    @type port: L{int}
    N)rrrrrrZhostnamerrrrrrSs
rF)r
�reprZcmpc@s`eZdZdZejej�e�d�Z	e
ejdd�dk	r<dd�Z
ndd�Z
dd	�Zd
d�Zdd
�ZdS)�UNIXAddressz�
    Object representing a UNIX socket endpoint.

    @ivar name: The filename associated with this socket.
    @type name: C{bytes}
    )Z	converter�samefileNc
Cs�t||j�r|j|jk}ndS|s�|jr�|jr�ztj�|j|j�WStk
rVYn6ttfk
r�}zt	szt
��sz|�W5d}~XYnX|S)z�
            Overriding C{attrs} to ensure the os level samefile
            check is done if the name attributes do not match.
            FN)�
isinstance�	__class__�name�os�pathr"�OSError�	TypeError�
ValueErrorr	rZisLinux)�self�other�res�errr�__eq__rszUNIXAddress.__eq__cCst||j�r|j|jkSdS)NF)r#r$r%�r+r,rrrr/�scCst||j�r|�|�SdS)NT)r#r$r/r0rrr�__ne__�szUNIXAddress.__ne__cCs |j}|rtd|j�}d|fS)N�zUNIXAddress(%r))r%r)r+r%rrr�__repr__�szUNIXAddress.__repr__cCsZ|jdkrt|jdf�Szt�|j�}t|j|jf�WStk
rTt|j�YSXdS)N)r%r
r$r&�stat�st_ino�st_devr()r+�s1rrr�__hash__�s
zUNIXAddress.__hash__)rrrrrrZ
convertersZoptionalrr%�getattrr&r'r/r1r3r8rrrrr!es
r!c@seZdZdZdd�ZdS)�_ServerFactoryIPv4Addressz@Backwards compatibility hack. Just like IPv4Address in practice.cCs`t|t�r*tjdtdd�|j|jf|kSt|t�r\|j|j|jf}|j|j|jf}||kSdS)Nz?IPv4Address.__getitem__ is deprecated.  Use attributes instead.�)�category�
stacklevelF)	r#�tuple�warnings�warn�DeprecationWarningrrrr)r+r,�a�brrrr/�s
�
z _ServerFactoryIPv4Address.__eq__N)rrrrr/rrrrr:�sr:)rZ
__future__rrrr?r&Zzope.interfacerZtwisted.internet.interfacesrZtwisted.python.filepathrrZtwisted.python.runtimerZtwisted.python.compatr	�s�objectrrrrr!r:rrrr�<module>s0


A