add sniff examples

This commit is contained in:
Mia von Steinkirch 2020-02-19 14:31:10 -08:00
parent 8c7ed08a62
commit 14202c080b
6 changed files with 167 additions and 1 deletions

View file

@ -0,0 +1,17 @@
import ctypes
class ICMP(ctypes.Structure):
_fields_ = [
('type', ctypes.c_ubyte),
('code', ctypes.c_ubyte),
('checksum', ctypes.c_ushort),
('unused', ctypes.c_ushort),
('next_hop_mtu',ctypes.c_ushort)
]
def __new__(self, socket_buffer):
return self.from_buffer_copy(socket_buffer)
def __init__(self, socket_buffer):
pass