Go to the latest version of this document.

# ``twisted`.`pair`.`ethernet`.`EthernetProtocol``

class documentation

`class EthernetProtocol(protocol.AbstractDatagramProtocol): (source)`

Implements interfaces: `twisted.pair.ethernet.IEthernetProtocol`

View In Hierarchy

Undocumented

Method | `__init__` | Undocumented
Method | `addProto` | Add an IRawPacketProtocol protocol
Method | `datagramReceived` | Called when a datagram is received.
Instance Variable | `etherProtos` | Undocumented

Inherited from `AbstractDatagramProtocol`:

Method | `__getstate__` | Undocumented
Method | `doStart` | Make sure startProtocol is called.
Method | `doStop` | Make sure stopProtocol is called.
Method | `makeConnection` | Make a connection to a transport and a server.
Method | `startProtocol` | Called when a transport is connected to this protocol.
Method | `stopProtocol` | Called when the transport is disconnected.
Class Variable | `noisy` | Undocumented
Instance Variable | `numPorts` | Undocumented
Instance Variable | `transport` | Undocumented

def __init__(self): (source)

Undocumented

def addProto(self, num, proto): (source)
from `twisted.pair.ethernet.IEthernetProtocol`

Add an IRawPacketProtocol protocol

def datagramReceived(self, data, partial=0): (source)
from `twisted.pair.ethernet.IEthernetProtocol`
overrides `twisted.internet.protocol.AbstractDatagramProtocol.datagramReceived`

Called when a datagram is received.

Parameters
data | Undocumented
partial | Undocumented
datagram | the bytes received from the transport.
addr | tuple of source of datagram.

etherProtos: `dict` = (source)

Undocumented