All of lore.kernel.org
 help / color / mirror / Atom feed
* Multiple programs for QUEUE target
@ 2006-04-04 13:55 David Vogt
  2006-04-04 14:02 ` David Vogt
  0 siblings, 1 reply; 6+ messages in thread
From: David Vogt @ 2006-04-04 13:55 UTC (permalink / raw)
  To: netfilter-devel

Dear all,

as far as I understand libipq it is not possible to register more than
one program that handles packets that are queued (using -j QUEUE),
since only one pid can be registered at /proc/net/ip_queue. Is that
right?

Now I have two questions:
1) Does libnetfilter_queue solve that problem
2) Will packets be processed by both applications?

The problem is that I use a closed source program here as well, that
employs libipq. Altough I could rewrite my own application to use
libnetfiter_queue I would highly appreciate a solution that uses
libipq. I am sure I read something about a "dispachter"-like program,
but I can't find it.

Thanks,
David

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

* Re: Multiple programs for QUEUE target
  2006-04-04 13:55 Multiple programs for QUEUE target David Vogt
@ 2006-04-04 14:02 ` David Vogt
  2006-04-05 15:24   ` Harald Welte
  0 siblings, 1 reply; 6+ messages in thread
From: David Vogt @ 2006-04-04 14:02 UTC (permalink / raw)
  To: netfilter-devel

2006/4/4, David Vogt <beunlovable@gmail.com>:
> I am sure I read something about a "dispachter"-like program,
> but I can't find it.

Of course I found it right after posting to the list. ipqmpd it is
called, however, it requires rewriting the program to some extend.
Since this is not possible for the closed source program, any advice
on how a solution to that problem might look like are highly
appreciated.

David

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

* Re: Multiple programs for QUEUE target
  2006-04-04 14:02 ` David Vogt
@ 2006-04-05 15:24   ` Harald Welte
  2006-04-06 10:50     ` David Vogt
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Welte @ 2006-04-05 15:24 UTC (permalink / raw)
  To: David Vogt; +Cc: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

On Tue, Apr 04, 2006 at 04:02:41PM +0200, David Vogt wrote:
> 2006/4/4, David Vogt <beunlovable@gmail.com>:
> > I am sure I read something about a "dispachter"-like program,
> > but I can't find it.
> 
> Of course I found it right after posting to the list. ipqmpd it is
> called, however, it requires rewriting the program to some extend.
> Since this is not possible for the closed source program, any advice
> on how a solution to that problem might look like are highly
> appreciated.

Please don't use any of that old 'crap' (I'm the author, so I can call
it that).  These days, you use NFQUEUE, nf_queue, nfnetlink_queue,
libnetfilter_queue, and you get up to 65535 distinct queues for
different userespace processes.

-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

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

* Re: Multiple programs for QUEUE target
  2006-04-05 15:24   ` Harald Welte
@ 2006-04-06 10:50     ` David Vogt
  2006-04-06 10:57       ` Patrick McHardy
  2006-04-06 13:13       ` Harald Welte
  0 siblings, 2 replies; 6+ messages in thread
From: David Vogt @ 2006-04-06 10:50 UTC (permalink / raw)
  To: Harald Welte, David Vogt, netfilter-devel

2006/4/5, Harald Welte <laforge@netfilter.org>:
> On Tue, Apr 04, 2006 at 04:02:41PM +0200, David Vogt wrote:
> Please don't use any of that old 'crap' (I'm the author, so I can call
> it that).  These days, you use NFQUEUE, nf_queue, nfnetlink_queue,
> libnetfilter_queue, and you get up to 65535 distinct queues for
> different userespace processes.

Is it possible to run libnetfilter_queue and libipq (for old
applications) in parallel? I did some testing and it doesn't seem to
work.

Thanks,
David

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

* Re: Multiple programs for QUEUE target
  2006-04-06 10:50     ` David Vogt
@ 2006-04-06 10:57       ` Patrick McHardy
  2006-04-06 13:13       ` Harald Welte
  1 sibling, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2006-04-06 10:57 UTC (permalink / raw)
  To: David Vogt; +Cc: Harald Welte, netfilter-devel

David Vogt wrote:
> 2006/4/5, Harald Welte <laforge@netfilter.org>:
> 
>>On Tue, Apr 04, 2006 at 04:02:41PM +0200, David Vogt wrote:
>>Please don't use any of that old 'crap' (I'm the author, so I can call
>>it that).  These days, you use NFQUEUE, nf_queue, nfnetlink_queue,
>>libnetfilter_queue, and you get up to 65535 distinct queues for
>>different userespace processes.
> 
> 
> Is it possible to run libnetfilter_queue and libipq (for old
> applications) in parallel? I did some testing and it doesn't seem to
> work.

Only a single queue handler can register for an address family inside
the kernel, so most likely one of them is simply not receiving any
packets. There is an ipq compat library for nfnetlink_queue, I'm not
sure but I think you should be able to use those in parallel.

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

* Re: Multiple programs for QUEUE target
  2006-04-06 10:50     ` David Vogt
  2006-04-06 10:57       ` Patrick McHardy
@ 2006-04-06 13:13       ` Harald Welte
  1 sibling, 0 replies; 6+ messages in thread
From: Harald Welte @ 2006-04-06 13:13 UTC (permalink / raw)
  To: David Vogt; +Cc: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

On Thu, Apr 06, 2006 at 12:50:05PM +0200, David Vogt wrote:
> 2006/4/5, Harald Welte <laforge@netfilter.org>:
> > On Tue, Apr 04, 2006 at 04:02:41PM +0200, David Vogt wrote:
> > Please don't use any of that old 'crap' (I'm the author, so I can call
> > it that).  These days, you use NFQUEUE, nf_queue, nfnetlink_queue,
> > libnetfilter_queue, and you get up to 65535 distinct queues for
> > different userespace processes.
> 
> Is it possible to run libnetfilter_queue and libipq (for old
> applications) in parallel? I did some testing and it doesn't seem to
> work.

you can run the libraries in parallel, but not the kernel code.

Why would you want to do that anyway?  libnetfilter_queue provides a
backwards compatibility API for libipq apps.

-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

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

end of thread, other threads:[~2006-04-06 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-04 13:55 Multiple programs for QUEUE target David Vogt
2006-04-04 14:02 ` David Vogt
2006-04-05 15:24   ` Harald Welte
2006-04-06 10:50     ` David Vogt
2006-04-06 10:57       ` Patrick McHardy
2006-04-06 13:13       ` 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.