Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7383 closed task (implemented)

Scapy sniff() should run in a separate thread and be stoppable

Reported by: hellais Owned by: hellais
Priority: High Milestone:
Component: Archived/Ooni Version:
Severity: Keywords: SponsorH201208
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


We want the ability to have scapy start sniffing on the selected interface when the test starts and have it stop when the test has finished.

The problem is that the scapy sniff() call in the stable version does not have an easy way of telling it when it should stop sniffing.

There is a patch for sniff() to allow the termination of sniff() based on the return value of a function:

Child Tickets

Change History (2)

comment:1 Changed 8 years ago by hellais

Resolution: implemented
Status: newclosed

This has been implemented in

It is still somewhat hacking especially the escamotage that is used to kill the thread that has the sniffer running inside of.

Ideally we would want to write our own sniff() function that does not rely on calling the scapy sniff.

This is also what is recommend by the author of scapy in a mailing list thread.

comment:2 Changed 8 years ago by hellais

Keywords: SponsorH201208 added

This has been implemented, although what would be nice is if it were to not require a separate thread to run, but it were to follow the ScapyProtocol implementation that can be found in ooni.utils.txscapy.

Note: See TracTickets for help on using tickets.