Open Kroptokin opened 1 year ago
More info.. I am working in Pyhton and I create a Process using Python3 Process Library in order to call the function that waits for an arp answer. It seems that the first time the function is called it does not give the error: b"The setting can't be changed after the pcap_t is activated" But all the other calls result in this error. It seems that the function uses the same address memory for the pcap_t struct for all calls of the function. Do you know any way of fixing it? In order to create a new variable for each call to the function where the pcap_t struct is created?
Not even creating a pcap_t struct, closing it witch libpcap.close(pcap_t) and creating another fixes the problem. I have tried with:
func_pcap_t = libpcap.pcap_t()
AND
func_pcap_t = libpcap.open_dead(libpcap.DLT_EN10MB, func_pcap_snaplen)
But none of them seem to work... always after the first call, which seems to work, gives the error message given above.
Okay... it seems solved using libpcap.create() function instead of open_dead() or simply creating an struct with libpcap.pcap_t()
Hi! I am trying to program a capture script using libpcap library for python. The problem is when I try to activate immediate mode, if gives me the following error:
ERROR = b"The setting can't be changed after the pcap_t is activated"
Some of my code:
`
`
I also tried to set immediate mode after open_live but gives the same error... What am I doing wrong and how can I fix this issue? The struct pcap_t seems to do not activated but the function does not think so.