All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fallucchi Antonio <fallucch@cisbic.com>
To: netfilter-devel <netfilter-devel@lists.netfilter.org>
Subject: create c programm for insert rules in netfilters
Date: Tue, 22 Jun 2004 11:45:08 +0200	[thread overview]
Message-ID: <40D7FFA4.3070002@cisbic.com> (raw)

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

                 reply	other threads:[~2004-06-22  9:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40D7FFA4.3070002@cisbic.com \
    --to=fallucch@cisbic.com \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.