�
Ϫ�f� � � � d Z ddlZddlmZmZ ddlmZ ddlmZ G d� de� Z G d� d � Z
ee � G d
� dej � � Zy)z1Support for working directly with ethernet frames� N)� Interface�implementer)�protocol)�rawc � � e Zd ZdZd� Zd� Zy)�IEthernetProtocolz6An interface for protocols that handle Ethernet framesc � � y)z"Add an IRawPacketProtocol protocolN� )�num�protos �7/usr/lib/python3/dist-packages/twisted/pair/ethernet.py�addProtozIEthernetProtocol.addProto � � � c � � y)z#An Ethernet frame has been receivedNr
)�data�partials r
�datagramReceivedz"IEthernetProtocol.datagramReceived r r N)�__name__�
__module__�__qualname__�__doc__r r r
r r
r r s � �@�1�2r r c � � e Zd Zd� Zy)�EthernetHeaderc �\ � t j d|d d � \ | _ | _ | _ y )Nz!6s6sH� )�struct�unpack�dest�sourcer )�selfr s r
�__init__zEthernetHeader.__init__ s) � �/5�}�}��d�;�Y�'�0
�,���D�K��r N)r r r r" |