I have the following sample code which doesn't seem to want to run.
import pcap
pc = pcap.pcapObject()
dev = sys.argv[1]
pc.open_live(dev, 1600, 0, 100)
pc.setfilter("udp port 53", 0, 0)
while 1:
pc.dispatch(1, p.pcap_dispatch)
I'm really not sure why. I'm using pypcap. I'm running this on both 2.5.1 and 2.6 versions of python (separate machines) using mac osx (leopard).