From: ilninno <ilninno@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: Hi again, get the process id associated to a packet
Date: Mon, 5 Jan 2009 01:43:14 +0100 [thread overview]
Message-ID: <92770c820901041643t1b460c2bj4323a60ffcfc2c94@mail.gmail.com> (raw)
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 */
};
but isnt easy to get struct nlmsghdr from netfilter packet, i saw some
could be but im not sure:
extern struct nlmsghdr *nfnl_get_msg_first(struct nfnl_handle *h,
const unsigned char *buf,
size_t len);
I don't know what is buf and len, i saw library code with ddd but
description is very short and i dont know how can i get buf and what
is exactly. Please someone can help me to get packet's pid? I tried
using netstat (-ntap | grep sourceport and destination ip) but is too
slow.
Thanks for your time and sorry for my english.
next reply other threads:[~2009-01-05 0:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 0:43 ilninno [this message]
2009-01-05 1:23 ` Hi again, get the process id associated to a packet Eric Leblond
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=92770c820901041643t1b460c2bj4323a60ffcfc2c94@mail.gmail.com \
--to=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).