How to compile libpcap applications under Ubuntu:
- Install libpcap:
sudo apt-get install libpcap0.8-dev
setup eclipse linker to handle libpcap:
Project -> properties -> build settings -> linker -> libraries -> add library
All you have to do is type in pcap.
To compile from the command line all you have to do is:
gcc -o {output} file.c -lpcap