diff options
author | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:16:14 +0300 |
---|---|---|
committer | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:43:30 +0300 |
commit | b8cf9e88f4c5c64d9406af533d8948deb050d695 (patch) | |
tree | 218eb61fb3c3b96ec08b4d8cdfef383104a87d63 /contrib/python/Twisted/py3/twisted/pair/raw.py | |
parent | 523f645a83a0ec97a0332dbc3863bb354c92a328 (diff) | |
download | ydb-b8cf9e88f4c5c64d9406af533d8948deb050d695.tar.gz |
add kikimr_configure
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/pair/raw.py')
-rw-r--r-- | contrib/python/Twisted/py3/twisted/pair/raw.py | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/contrib/python/Twisted/py3/twisted/pair/raw.py b/contrib/python/Twisted/py3/twisted/pair/raw.py new file mode 100644 index 0000000000..cf564fb17d --- /dev/null +++ b/contrib/python/Twisted/py3/twisted/pair/raw.py @@ -0,0 +1,54 @@ +# Copyright (c) Twisted Matrix Laboratories. +# See LICENSE for details. +""" +Interface definitions for working with raw packets +""" + +from zope.interface import Interface + + +class IRawDatagramProtocol(Interface): + """ + An interface for protocols such as UDP, ICMP and TCP. + """ + + def addProto(num, proto): + """ + Add a protocol on top of this one. + """ + + def datagramReceived( + data, + partial, + source, + dest, + protocol, + version, + ihl, + tos, + tot_len, + fragment_id, + fragment_offset, + dont_fragment, + more_fragments, + ttl, + ): + """ + An IP datagram has been received. Parse and process it. + """ + + +class IRawPacketProtocol(Interface): + """ + An interface for low-level protocols such as IP and ARP. + """ + + def addProto(num, proto): + """ + Add a protocol on top of this one. + """ + + def datagramReceived(data, partial, dest, source, protocol): + """ + An IP datagram has been received. Parse and process it. + """ |