web3-starter-py/boilerplates/security/python_sniff_scanner/icmp_example.py
osiris account 69bb4175f1 💾
2023-03-12 15:29:57 -07:00

17 lines
No EOL
488 B
Python

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