Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2005 09:39:46 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        "C.G.Senthilkumar." <cheetanc@cs.ucdavis.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: libiptc equivalent in FreeBSD ipfw
Message-ID:  <20050524143945.GE16069@dan.emsphone.com>
In-Reply-To: <Pine.LNX.4.61.0505232330350.6749@pc49.cs.ucdavis.edu>
References:  <Pine.LNX.4.61.0505232330350.6749@pc49.cs.ucdavis.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 23), C.G.Senthilkumar. said:
> I want to add some rules to the ipfw kernel table directly from my
> program rather than going through the ipfw user-space program. Is
> there some control library analogous to libiptc in Linux's
> netfilter/iptables that would let me do that?
> 
> If yes, where could I learn more about it?

No, /usr/sbin/ipfw is the only "API" available.  If you don't want the
overhead of forking a new process every time you want to add or change
a rule, you can fork an ipfw in the background when your program
starts: "ipfw /dev/fd/0" will take commands on stdin and print to
stdout.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050524143945.GE16069>