SOLVED by moving the -lpcap param to the EOL, i.e.: gcc -Wall -o hexinject hexinject.c -lpcap gcc -Wall -o prettypacket prettypacket.c -lpcap gcc -Wall -o hex2raw hex2raw.c -lpcap Hope that helps others having the same problem.
I am having a similar trouble: # make gcc -Wall -lpcap -o hexinject hexinject.c /tmp/ccYufKqX.o: In function `inject_raw': hexinject.c:(.text+0x28b4): undefined reference to `pcap_sendpacket' /tmp/ccYufKqX.o: In function `sniff_hexstr': hexinject.c:(.text+0x2a05): undefined reference to `pcap_next' /tmp/ccYufKqX.o: In function `sniff_raw': hexinject.c:(.text+0x2ace): undefined reference to `pcap_next' /tmp/ccYufKqX.o: In function `inject_hexstr_loop': hexinject.c:(.text+0x2df7): undefined reference...
I am having a similar trouble: # make gcc -Wall -lpcap -o hexinject hexinject.c /tmp/ccYufKqX.o: In function `inject_raw': hexinject.c:(.text+0x28b4): undefined reference to `pcap_sendpacket' /tmp/ccYufKqX.o: In function `sniff_hexstr': hexinject.c:(.text+0x2a05): undefined reference to `pcap_next' /tmp/ccYufKqX.o: In function `sniff_raw': hexinject.c:(.text+0x2ace): undefined reference to `pcap_next' /tmp/ccYufKqX.o: In function `inject_hexstr_loop': hexinject.c:(.text+0x2df7): undefined reference...