Stroke
I did not write this tool.
This is an example of libpcap usage in C ripped from Building Open Source Network Security Tools - Components and Techniques by Mike D. Schiffman. I've updated the OUI list as of February 2018, made a few minor formatting changes, and made this available for educational purposes.
The original book examples can still be downloaded from http://www.wiley.com//legacy/compbooks/schiffman/
This builds without error on Ubuntu 16.04. You need libpcap installed:
apt install libpcap-dev
Building is straightforward:
./update-oui-h.sh
make