All of lore.kernel.org
 help / color / mirror / Atom feed
* libiptc - frustrating
@ 2003-10-02 15:49 Karsten Römke
  2003-10-02 20:13 ` Harald Welte
  0 siblings, 1 reply; 5+ messages in thread
From: Karsten Römke @ 2003-10-02 15:49 UTC (permalink / raw)
  To: netfilter-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-04 13:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-02 15:49 libiptc - frustrating Karsten Römke
2003-10-02 20:13 ` 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

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.