/usr/lib/python3/dist-packages/twisted/pair/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/pair/__pycache__/tuntap.cpython-310.pyc (13350B)
o
b0 @ sl d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZmZm
Z
ddlmZmZ ddlmZ ddlmZmZmZmZmZ dd lmZmZ dd
lmZ ddlmZ ddl m!Z! dd
l"m#Z#m$Z$ g dZ%dZ&dZ'dZ(dZ)G dd deZ*e
ej+G dd de$e#Z,G dd deddZ-G dd deZ.G dd dZ/e
ej0G dd dej1Z2dS ) zc
Support for Linux ethernet and IP tunnel devices.
@see: U{https://en.wikipedia.org/wiki/TUN/TAP}
N)
namedtuple)Tuple) Attribute Interfaceimplementer)FlagConstantFlags)Version)abstractdefererror
interfacestask)ethernetraw)log)
deprecated)fullyQualifiedName)FancyEqMixin
FancyStrMixin)TunnelFlags
TunnelAddress
TuntapPort iT@l T s /dev/net/tunc @ sp e Zd ZdZedZedZedZedZedZ edZ
edZed Zed
Z
edZedZed
ZdS )r a~
L{TunnelFlags} defines more flags which are used to configure the behavior
of a tunnel device.
@cvar IFF_TUN: This indicates a I{tun}-type device. This type of tunnel
carries IP datagrams. This flag is mutually exclusive with C{IFF_TAP}.
@cvar IFF_TAP: This indicates a I{tap}-type device. This type of tunnel
carries ethernet frames. This flag is mutually exclusive with C{IFF_TUN}.
@cvar IFF_NO_PI: This indicates the I{protocol information} header will
B{not} be included in data read from the tunnel.
@see: U{https://www.kernel.org/doc/Documentation/networking/tuntap.txt}
r @ i i i @ i N)__name__
__module____qualname____doc__r IFF_TUNIFF_TAP
TUN_FASYNCTUN_NOCHECKSUM TUN_NO_PI
TUN_ONE_QUEUETUN_PERSISTTUN_VNET_HDR IFF_NO_PI
IFF_ONE_QUEUEIFF_VNET_HDRIFF_TUN_EXCL r1 r1 5/usr/lib/python3/dist-packages/twisted/pair/tuntap.pyr , s r c @ s@ e Zd ZdZdZddd fdfZedd Zd d
Zdd Z d
S )r zU
A L{TunnelAddress} represents the tunnel to which a L{TuntapPort} is bound.
)
_typeValuenametypec C | j S N)r4 )flagr1 r1 r2
T s zTunnelAddress.r4 c C s | j jS )z
Return the integer value of the C{type} attribute. Used to produce
correct results in the equality implementation.
)r5 valueselfr1 r1 r2 r3 V s zTunnelAddress._typeValuec C s || _ || _dS )z
@param type: Either L{TunnelFlags.IFF_TUN} or L{TunnelFlags.IFF_TAP},
representing the type of this tunnel.
@param name: The system name of the tunnel.
@type name: L{bytes}
N)r5 r4 )r<