From: Mikado <mikado4vn@yahoo.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: linux-kernel@vger.kernel.org, linux-c-programming@vger.kernel.org
Subject: Re: How to obtain process ID that created a packet
Date: Mon, 26 Dec 2005 17:47:10 -0800 (PST) [thread overview]
Message-ID: <20051227014710.43609.qmail@web53708.mail.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0512262334210.12671@yvahk01.tjqt.qr>
> >Hi,
> >
> >Is there any way to catch REAL pid that generated a packet from 'struct sk_buff', 'struct
sock', 'struct socket', 'struct file' or etc... ? direct/indirect ways are accepted.
>
> The question is: when do you test for the PID? You would have to do it
> within send(), because anywhere else, you do not know. A socket may be
> shared among multiple processes (most simple way: fork()).
I'm hooking in NF_IP_LOCAL_OUT of netfilter code using nf_register_hook() function.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
next prev parent reply other threads:[~2005-12-27 1:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-26 16:22 How to obtain process ID that created a packet Mikado
2005-12-26 22:36 ` Jan Engelhardt
2005-12-27 1:47 ` Mikado [this message]
2005-12-27 8:26 ` Jan Engelhardt
2005-12-27 10:55 ` Michael Tokarev
2005-12-27 18:03 ` Jan Engelhardt
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=20051227014710.43609.qmail@web53708.mail.yahoo.com \
--to=mikado4vn@yahoo.com \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-c-programming@vger.kernel.org \
--cc=linux-kernel@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).