All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Leblond <eleblond@inl.fr>
To: netfilter@lists.netfilter.org
Subject: Re: how to use NF_QUEUE
Date: Wed, 09 Feb 2005 12:26:39 +0100	[thread overview]
Message-ID: <1107948399.29502.2.camel@localhost.localdomain> (raw)
In-Reply-To: <20050209111625.40750.qmail@web50409.mail.yahoo.com>

Le mercredi 09 février 2005 à 03:16 -0800, vinay mathew a écrit : 
> Hi,
> I am a newbie regarding Netfilter.I need to use the
> Netfilter hooks for a project. I have tried out the
> hook functions using NF_ACCEPT, NF_DROP.I need to use
> NF_QUEUE to queue certain packets to the user space
> where i need to process them further and then send
> these packets back into the network stack.
> I have not done this before so does anyone have some
> simple sample code using this option so that i can get
> a start on how its done.

Use libipq, it's the easiest way to send packet to userspace and put
them back in the network stack. The man page contains some examples. 

For a more concrete example you can have a look at the nufw project
(http://www.nufw.org).
The file src/nufw/packetsrv.c and src/nufw/authsrv.c contain code
example.

BR,
-- 
Éric Leblond, eleblond@inl.fr
Téléphone : 01 44 89 46 40, Fax : 01 44 89 45 01
INL, http://www.inl.fr



  reply	other threads:[~2005-02-09 11:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-09 11:16 how to use NF_QUEUE vinay mathew
2005-02-09 11:26 ` Eric Leblond [this message]
2005-02-09 11:31 ` Eric Leblond
2005-02-09 17:37 ` Ulysses Almeida

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=1107948399.29502.2.camel@localhost.localdomain \
    --to=eleblond@inl.fr \
    --cc=netfilter@lists.netfilter.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.