All of lore.kernel.org
 help / color / mirror / Atom feed
From: Reuben Martin <reuben.m@gmail.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>, netfilter@vger.kernel.org
Subject: Re: ipsets: examples?
Date: Mon, 20 Dec 2010 14:18:14 -0600	[thread overview]
Message-ID: <201012201418.14281.reuben.m@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1012201622001.14191@blackhole.kfki.hu>

On Monday, December 20, 2010, Jozsef Kadlecsik wrote:
> Hi,
> 
> On Sun, 19 Dec 2010, Reuben Martin wrote:
> 
> > I'm trying to put together an extension to forward udp packets to an 
> > arbritary set of destinations using ipsets. Specifically I want the 
> > extension to be able to take either an ipmap or iphash as a set of 
> > destinations for the forwarded udp packets. (I'm starting with the 
> > rawdnat, stripping out the tcp code, and changing it so that it 
> > duplicates the packet as needed for destinations instead of changing the 
> > dest address in the origional packet.
> 
> I don't really see why you need to embed ipset. Why don't you call it as a 
> normal match and use your extension as a target?
> 

I think I have misunderstood what can be done with ipsets. I knew you could use it as a match, but for some reason I though it had an API to allow other extensions to use sets as targets. (i.e. my intention is, as you suggested, to use the extension as a target)

Is there any way via the standard API to request the contents of a named set? That's really what I want to do. Basically for each packet I would request I want to be able to check what addresses are in the set named in the parameters of my extension, and then copy the packets to each of those addresses, and hence have a dynamic list of destination addresses.

If there is no such API would it be too hard to create one? It would be great to be able to access the sets as linked lists, while having ipset internally managing the locking so that something is not accessing the list while an element in the list is being added or removed.

-Reuben

  reply	other threads:[~2010-12-20 20:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20  4:37 ipsets: examples? Reuben Martin
2010-12-20 15:07 ` Reuben Martin
2010-12-20 15:45 ` Jozsef Kadlecsik
2010-12-20 20:18   ` Reuben Martin [this message]
2010-12-21  9:36     ` Jozsef Kadlecsik
2010-12-21 16:54       ` Reuben Martin
2010-12-22 10:45         ` Jozsef Kadlecsik
2010-12-22 16:21           ` Reuben Martin

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=201012201418.14281.reuben.m@gmail.com \
    --to=reuben.m@gmail.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter@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.