Perhaps I can write a driver for C <-> bpf interaction, then use python to invoke my C program periodically. But if python has a way of directly interact with bpf, it will be great. Besides, I am using FreeBSD Thanks Sam.