All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira <pablo@eurodev.net>
To: "Horton, Dave" <dhorton@pactolus.com>,
	Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>
Subject: Re: can a netfilter hook interact with userspace ?
Date: Thu, 22 Jul 2004 11:17:53 +0200	[thread overview]
Message-ID: <40FF8641.1080607@eurodev.net> (raw)
In-Reply-To: <2CC2CB3C95C3D311ABAC009027DCD77E019690D6@flyhalf.pactolus.com>

Hi Dave,

Horton, Dave wrote:

>Thank you, both the example code and the netfilter hacking how to were
>helpful as far as how to write the kernel side of things.  However, I'm
>unclear how the user program needs to be written, and the how-to doesn't
>seem to address this.  I'm quite familiar with sockets programming, though
>not in this context (user-kernel communication), and I am wondering exactly
>how the user program creates the socket (via socket() I assume, but what
>params?) in such a way as to "connect" to my kernel module, such that calls
>it issues to getsockopt and setsockopt call my handler.  Sorry for the dumb
>question and I will gladly read the relevant docs (or even better: sample
>code) if someone can point me to them, but I scoured the netfilter hacking
>howto and didn't find the info I need.
>
>  
>

Krisztian Kovacs wrote some time ago an user space program and the 
kernel part (patch) to send information to the connection tracking 
system via getsockopt/setsockopt. I think that it's a nice sample code 
of how to use getsockopt/setsockopt to retrieve/pass information from/to 
kernel space.

http://lists.netfilter.org/pipermail/netfilter-devel/2004-May/015385.html

hope that it helps.

regards,
Pablo

  reply	other threads:[~2004-07-22  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-22  1:08 can a netfilter hook interact with userspace ? Horton, Dave
2004-07-22  9:17 ` Pablo Neira [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-07-19  4:29 Horton, Dave
2004-07-21 16:09 ` Pablo Neira

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=40FF8641.1080607@eurodev.net \
    --to=pablo@eurodev.net \
    --cc=dhorton@pactolus.com \
    --cc=netfilter-devel@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.