From: Eric Leblond <eric@inl.fr>
To: ilninno <ilninno@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Hi again, get the process id associated to a packet
Date: Mon, 05 Jan 2009 02:23:40 +0100 [thread overview]
Message-ID: <1231118620.3927.18.camel@ice-age> (raw)
In-Reply-To: <92770c820901041643t1b460c2bj4323a60ffcfc2c94@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]
Hi,
Le lundi 05 janvier 2009 à 01:43 +0100, ilninno a écrit :
> Hello again, im the insistent newbie :)
>
> Im trying to get packet pid (process identifier) but netfilter and
> nfnetlink functions aren't very clear:
>
> I saw a reference to packed pid in:
>
> struct nlmsghdr
> {
> __u32 nlmsg_len; /* Length of message including header */
> __u16 nlmsg_type; /* Message content */
> __u16 nlmsg_flags; /* Additional flags */
> __u32 nlmsg_seq; /* Sequence number */
> __u32 nlmsg_pid; /* Sending process port ID */
> };
You won't find the process id information in the kernel to userspace
message. The list of available fields is available in the
(linux_)nfnetlink_queue.h file:
https://git.netfilter.org/cgi-bin/gitweb.cgi?p=libnetfilter_queue.git;a=blob;f=include/libnetfilter_queue/linux_nfnetlink_queue.h;h=191b094b4ae071dddefb50d04b2c08b6fcadd488;hb=HEAD#l35
By the way, you will find some libnetfilter_queue documentation here:
http://www.nufw.org/doc/libnetfilter_queue/
PS: for your privately send question (please avoid this), you can't bind
two programs to the same queue.
BR,
--
Eric Leblond <eric@inl.fr>
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2009-01-05 1:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 0:43 Hi again, get the process id associated to a packet ilninno
2009-01-05 1:23 ` Eric Leblond [this message]
2009-01-05 2:56 ` Jan Engelhardt
2009-01-05 9:59 ` ilninno
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=1231118620.3927.18.camel@ice-age \
--to=eric@inl.fr \
--cc=ilninno@gmail.com \
--cc=netfilter-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).