gcc packetforward.c -o packetforward -I/usr/include -L/usr/lib -lpcap `libnet-config --defines --cflags --libs`
packetforward.c:8:20: error: libnet.h: No such file or directory
In file included from packetforward.c:9:
headers.h:34: error: field 'ip_src' has incomplete type
headers.h:34: error: field 'ip_dst' has incomplete type
packetforward.c: In function 'send_packet':
packetforward.c:188: error: 'LIBNET_ERRBUF_SIZE' undeclared (first use in this function)
packetforward.c:188: error: (Each undeclared identifier is reported only once
packetforward.c:188: error: for each function it appears in.)
packetforward.c:201: warning: assignment makes pointer from integer without a cast
packetforward.c:202: error: 'LIBNET_ERR_FATAL' undeclared (first use in this function)
packetforward.c:211: error: 'LIBNET_ETH_H' undeclared (first use in this function)
packetforward.c:211: error: 'LIBNET_IP_H' undeclared (first use in this function)
packetforward.c:211: error: 'LIBNET_UDP_H' undeclared (first use in this function)
packetforward.c:228: error: 'ETHERTYPE_IP' undeclared (first use in this function)
packetforward.c:244: error: 'IPPROTO_UDP' undeclared (first use in this function)
packetforward.c:264: error: 'ETH_H' undeclared (first use in this function)
packetforward.c:267: error: 'IPPROTO_IP' undeclared (first use in this function)
packetforward.c:286: error: 'LIBNET_TCP_H' undeclared (first use in this function)
packetforward.c:319: error: 'IPPROTO_TCP' undeclared (first use in this function)
packetforward.c:369: error: 'LN_ERR_WARNING' undeclared (first use in this function)
packetforward.c: In function 'got_packet':
packetforward.c:427: error: 'IPPROTO_TCP' undeclared (first use in this function)
packetforward.c:429: error: 'IPPROTO_UDP' undeclared (first use in this function)
packetforward.c:431: error: 'IPPROTO_ICMP' undeclared (first use in this function)
packetforward.c:434: error: 'IPPROTO_IP' undeclared (first use in this function)
packetforward.c:508: warning: assignment makes pointer from integer without a cast
packetforward.c: In function 'main':
packetforward.c:541: error: 'optarg' undeclared (first use in this function)
packetforward.c:554: warning: incompatible implicit declaration of built-in function 'strcpy'
packetforward.c:564: warning: incompatible implicit declaration of built-in function 'exit'
packetforward.c:564: error: 'EXIT_FAILURE' undeclared (first use in this function)
packetforward.c:570: warning: incompatible implicit declaration of built-in function 'exit'
packetforward.c:574: warning: assignment makes pointer from integer without a cast
packetforward.c:637: warning: incompatible implicit declaration of built-in function 'exit'
packetforward.c:637: error: 'EXIT_SUCCESS' undeclared (first use in this function)
make: *** [all] Error 1