All of lore.kernel.org
 help / color / mirror / Atom feed
* create c programm for insert rules in netfilters
@ 2004-06-22  9:45 Fallucchi Antonio
  0 siblings, 0 replies; only message in thread
From: Fallucchi Antonio @ 2004-06-22  9:45 UTC (permalink / raw)
  To: netfilter-devel

hi,

I must create a c programm for inserting rules in iptables..

I have used  "do_command" function:

char *tablename = "filter";
iptc_handle_t h = NULL;
char *vettarg[] = {"iptable", "-t", "nat", "-A", "OUTPUT", "-d", "!", 
"127.0.0.1", "-p", "tcp", "--tcp-flags", "syn", "syn", "-j", "QUEUE"};
int numarg=15;
do_command(numarg, vettarg, &tablename, &h);


but, the program crashes with segmentation fault doing;

for (protocol = argv[optind-1]; *protocol; protocol++)
                *protocol = tolower(*protocol);

please help me!
Antonio

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-22  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-22  9:45 create c programm for insert rules in netfilters Fallucchi Antonio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.