All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biermann-Roemke@t-online.de (Karsten Römke)
To: netfilter-devel@lists.netfilter.org
Subject: libiptc - frustrating
Date: Thu, 02 Oct 2003 17:49:45 +0200	[thread overview]
Message-ID: <3F7C4919.8060800@hhb.bonn.de> (raw)

Hi!

A long time ago (means 12 month or something like this)
I wrote c++-Classes around some functionality of libiptc and
iptables. Used iptables-1.2.6a.
Now, I'm changing my linux version and they actually use 1.2.7a,
maybe patched, it's a suse 8.2.

Hmm, same program works on old-Version and leads to a segmentation
fault in the new version. (Kernel differs too).

I remember that I need some time to analyse iptables and the calls
to libiptc and I think I understand it half (maybe).
My needs are only the insertion / deletion of  redirection-rules, if the 
source
of the packet was a specified IP. Furthermore I create a new chain out
of my program.

OK, cause it was some work I now thought:
"look for examples in the archive" and I found:

 >We said it before and we say it again. libiptc was never intended to 
be used
 >by anything else but iptables.c self. Its not an "open" API to be used by
 >any C-program. It might be and will be changed without any notice possible
 >making your c-program not working anymore.

Uuups - horrible for me :-)

Question: how can I insert a rule from a running daemon in the fastest way:
1) calling a system("iptables ..."), don't know if the syntas is correct
2) doing the work again of analyzing the source code again
3) linking iptables.o to my application. I remember, that I've not done that
    because iptables never frees any memory - only allocates - not 
useful for a
    long time running program.
    If I'm not right with this, excuse me, I just have something in mind 
like this :-)

Thank you

	Karsten

             reply	other threads:[~2003-10-02 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-02 15:49 Karsten Römke [this message]
2003-10-02 20:13 ` libiptc - frustrating Harald Welte
2003-10-03 11:08   ` Karsten Römke
2003-10-04  8:39   ` Karsten Römke
2003-10-04 13:12     ` Harald Welte

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=3F7C4919.8060800@hhb.bonn.de \
    --to=biermann-roemke@t-online.de \
    --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.