Linux Netfilter discussions
 help / color / mirror / Atom feed
From: shaun <shaun@newfind.net>
To: netfilter@lists.samba.org
Subject: libiptc and adding a simple SNAT rule
Date: Mon, 17 Jun 2002 08:59:16 -0700	[thread overview]
Message-ID: <20020617085916.A1493@localhost.sd.cox.net> (raw)

Hello -

I'm building an app that will dynamically modify rules in the POSTROUTING chain
in the nat table (SNAT).  I can iterate through the list and remove chain
entries ok so far, and I have some example code that successfully appends a
'blank' rule to the chain.  

But when I try to iptc_append_entry a simple but specific rule I've created in
my app to the chain, I get an error on the iptc_commit.  

In my app, I can compare (what should be) an identical rule as created by
running /sbin/iptables vs. the struct ipt_entry I'm trying to append and the
only difference I see is a difference in the target offset size.  Evidently,
I'm supposed to add some data to the end of the struct ipt_entry.

So my question:  What am I supposed to tack on to the end of the struct
ipt_entry when constructing and appending a non multi-range SNAT rule?

Thanks.

-- 
Shaun McIntyre
shaun@newfind.net
(760) 230-1131 voice
(619) 665-1424 cell


                 reply	other threads:[~2002-06-17 15:59 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=20020617085916.A1493@localhost.sd.cox.net \
    --to=shaun@newfind.net \
    --cc=netfilter@lists.samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox