Initial import to Tizen
[profile/ivi/python-twisted.git] / twisted / pair / raw.py
1 # Copyright (c) Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4 #
5
6 """Interface definitions for working with raw packets"""
7
8 from twisted.internet import protocol
9 from zope.interface import Interface
10
11 class IRawDatagramProtocol(Interface):
12     """An interface for protocols such as UDP, ICMP and TCP."""
13
14     def addProto():
15         """
16         Add a protocol on top of this one.
17         """
18
19     def datagramReceived():
20         """
21         An IP datagram has been received. Parse and process it.
22         """
23
24 class IRawPacketProtocol(Interface):
25     """An interface for low-level protocols such as IP and ARP."""
26
27     def addProto():
28         """
29         Add a protocol on top of this one.
30         """
31
32     def datagramReceived():
33         """
34         An IP datagram has been received. Parse and process it.
35         """