+
    Dfj                         R t ^ RIt^ RIHtHt ^ RIHt ^ RIHt  ! R R]4      t	 ! R R4      t
]! ]	4       ! R	 R
]P                  4      4       tR# )z1Support for working directly with ethernet framesN)	Interfaceimplementer)protocol)rawc                   0   a  ] tR t^t o RtR tR tRtV tR# )IEthernetProtocolz6An interface for protocols that handle Ethernet framesc                    R# )z"Add an IRawPacketProtocol protocolN )numprotos   &&7/usr/lib/python3/dist-packages/twisted/pair/ethernet.pyaddProtoIEthernetProtocol.addProto           c                    R# )z#An Ethernet frame has been receivedNr	   )datapartials   &&r   datagramReceived"IEthernetProtocol.datagramReceived   r   r   r	   N)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     @12 2r   r   c                   &   a  ] tR t^t o R tRtV tR# )EthernetHeaderc                `    \         P                  ! R VR^ 4      w  V n        V n        V n        R# )z!6s6sHN)structunpackdestsourcer   )selfr   s   &&r   __init__EthernetHeader.__init__   s)    /5}}d;Y'0
,DKr   )r$   r   r%   N)r   r   r   r   r'   r   r   r   s   @r   r    r       s     
 
r   r    c                   6   a  ] tR t^#t o R tR tRR ltRtV tR# )EthernetProtocolc                    / V n         R # )NetherProtos)r&   s   &r   r'   EthernetProtocol.__init__%   s
    r   c                    \         P                  ! V4      pV^ 8  d   \        R4      hVR8  d   \        R4      hWP                  9  d   . V P                  V&   V P                  V,          P	                  V4       R# )    z'Added protocol must be positive or zeroz"Added protocol must fit in 16 bitsNi   )r   IRawPacketProtocol	TypeErrorr-   append)r&   r
   r   s   &&&r   r   EthernetProtocol.addProto(   sm    &&u-7EFF%<@AA&&&$&DS!$$U+r   c           	         \        VR ,          4      pV P                  P                  VP                  R4       F>  pVP	                  VR,          VVP
                  VP                  VP                  R7       K@  	  R# ):N   N:r6   NN)r   r   r$   r%   r   Nr	   )r    r-   getr   r   r$   r%   )r&   r   r   headerr   s   &&&  r   r   !EthernetProtocol.datagramReceived2   sc    S	*%%))&,,;E""#Y[[}} #  <r   r,   N)r0   )	r   r   r   r   r'   r   r   r   r   r   s   @r   r*   r*   #   s     ,	 	r   r*   )r   r"   zope.interfacer   r   twisted.internetr   twisted.pairr   r   r    AbstractDatagramProtocolr*   r	   r   r   <module>r>      sS    8  1 % 2	 2
 
 x88   r   