U
    n5{i]  ã                   @   s4   d Z ddlmZ G dd„ deƒZG dd„ deƒZdS )z4
Interface definitions for working with raw packets
é    )Ú	Interfacec                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚIRawDatagramProtocolz?
    An interface for protocols such as UDP, ICMP and TCP.
    c                 C   s   dS ©z4
        Add a protocol on top of this one.
        N© ©ÚnumÚprotor   r   ú4/tmp/pip-unpacked-wheel-mnhg7r0q/twisted/pair/raw.pyÚaddProto   s    zIRawDatagramProtocol.addProtoc                 C   s   dS ©zI
        An IP datagram has been received. Parse and process it.
        Nr   )ÚdataÚpartialÚsourceÚdestÚprotocolÚversionZihlZtosZtot_lenZfragment_idZfragment_offsetZdont_fragmentZmore_fragmentsZttlr   r   r	   ÚdatagramReceived   s    z%IRawDatagramProtocol.datagramReceivedN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r	   r   
   s   r   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚIRawPacketProtocolzB
    An interface for low-level protocols such as IP and ARP.
    c                 C   s   dS r   r   r   r   r   r	   r
   .   s    zIRawPacketProtocol.addProtoc                 C   s   dS r   r   )r   r   r   r   r   r   r   r	   r   3   s    z#IRawPacketProtocol.datagramReceivedNr   r   r   r   r	   r   )   s   r   N)r   Zzope.interfacer   r   r   r   r   r   r	   Ú<module>   s   