There was a library pylibpcap for python2 that contained the functionality to create pcap objects like this:
import pcap
pc = pcap.pcapObject()
Now I'm looking for an analogue for python3, but from what I found (pypcap, pcap-ct), these libraries don't contain similar functionality and look completely different. So maybe someone knows how the pylibpcap library can be replaced in python3? I will be grateful for any advice.