Controlling libpcap

Motivated by #283.