OONI probe needs to be able to read and write pcap data.
We need a way to read all the data that is sent and received by a certain test. This can be achieved with one of three ways:
- The writer of a test specifies the BPF filter  that packets generated by it's test will adhere to
- The packets generated by the test are marked in a way that it is then possible to retrieve them from the midst of other packets.
- We create a tun/tap device specific for ooni probe or one for each test and route the traffic of the test through it.
For pcap support in python there is pypcap: http://code.google.com/p/pypcap/