Some C code to show how to use BPF, queue and signals to monitor network devices on OS X.