1 # Copyright (c) Twisted Matrix Laboratories.
2 # See LICENSE for details.
6 """Interface definitions for working with raw packets"""
8 from twisted.internet import protocol
9 from zope.interface import Interface
11 class IRawDatagramProtocol(Interface):
12 """An interface for protocols such as UDP, ICMP and TCP."""
16 Add a protocol on top of this one.
19 def datagramReceived():
21 An IP datagram has been received. Parse and process it.
24 class IRawPacketProtocol(Interface):
25 """An interface for low-level protocols such as IP and ARP."""
29 Add a protocol on top of this one.
32 def datagramReceived():
34 An IP datagram has been received. Parse and process it.