From: Patrick McHardy <kaber@trash.net>
To: cyx <cyx@fiberhome.com.cn>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: CAN you give me a piece of sample code to implement this iptables command? thanks
Date: Sun, 11 May 2008 17:27:59 +0200 [thread overview]
Message-ID: <4827107F.9030707@trash.net> (raw)
In-Reply-To: <200805112243513753221@fiberhome.com.cn>
cyx wrote:
> HI, all:
>
> the command is "iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE"
>
> how to write the code using libiptc to implement this? It is hard to get enough useful information about programing with libiptc APIs, so can you give me the sample code ? thanks a lot!
libiptc doesn't provide a API for external programs, its purely
for iptables use. You *can* use it (at least some people do),
but we give no guarantees that it stays stable and additionally
it used to leak memory (not sure about the state today).
next prev parent reply other threads:[~2008-05-11 15:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-11 14:43 CAN you give me a piece of sample code to implement this iptables command? thanks cyx
2008-05-11 15:27 ` Patrick McHardy [this message]
2008-05-11 15:47 ` Re: CAN you give me a piece of sample code to implement this iptablescommand? thanks cyx
2008-05-11 23:11 ` Henrik Nordstrom
2008-05-12 15:59 ` Patrick McHardy
2008-05-12 16:47 ` Jan Engelhardt
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=4827107F.9030707@trash.net \
--to=kaber@trash.net \
--cc=cyx@fiberhome.com.cn \
--cc=netfilter-devel@vger.kernel.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.