I am trying to compile the example C code provided here http://www.bani.com.br/lang/en/2012/05/programmatically-managing-iptables-rules-in-c-iptc/
using (as described in the post):
cc `pkg-config –cflags –libs libiptc` iptablesExample_2.c -o iptablesExample_2
I have also tried compiling it using:
sudo gcc -g -o iptablesExample_2 iptablesExample_2.c -liptc -liptables -ldl
it did not work also and the error this time was:
/usr/bin/ld: cannot find -liptables
collect2: ld returned 1 exit status
I also tried the example provided at the end of this http://wiki.tldp.org/iptc%20library%20HOWTO And I had the same issues
Linux kernel: 3.8.2 iptables version: v1.4.12