From: Stephen Hemminger <shemminger@osdl.org>
To: silviu.craciunas@sbg.ac.at
Cc: linux-kernel@vger.kernel.org
Subject: Re: get device from file struct
Date: Thu, 14 Dec 2006 10:45:18 -0800 [thread overview]
Message-ID: <20061214104518.6ad2cc4c@freekitty> (raw)
In-Reply-To: <1166101408.6186.7.camel@ThinkPadCK6>
On Thu, 14 Dec 2006 14:03:28 +0100
Silviu Craciunas <silviu.craciunas@sbg.ac.at> wrote:
> On Wed, 2006-12-13 at 15:53 -0800, Stephen Hemminger wrote:
> > The connection between file and network device is through many
> > layers and there is no direct binding. It could be 0 to N interfaces
> > and even be data dependent.
>
> you mean protocol dependent? yes,it goes trough the layer of the vfs but
> I thought there may be a way to get to the struct net_device from the
> struct file. You have the dev_base which contains all devices and in the
> net_device there is the ifindex which is the unique identifier. I guess
> there is no way to know the ifindex directly from a socket struct.
>
> thanks
> silviu
>
You can have things like netfilter and traffic classifiers that look
at packet.
--
Stephen Hemminger <shemminger@osdl.org>
prev parent reply other threads:[~2006-12-14 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-11 15:22 get device from file struct Silviu Craciunas
2006-12-11 18:34 ` Brice Goglin
2006-12-12 9:04 ` Silviu Craciunas
2006-12-13 9:59 ` Jan Engelhardt
2006-12-13 10:37 ` Silviu Craciunas
2006-12-13 11:03 ` Jan Engelhardt
2006-12-13 12:28 ` Silviu Craciunas
2006-12-13 19:19 ` Jan Engelhardt
2006-12-13 23:53 ` Stephen Hemminger
2006-12-14 13:03 ` Silviu Craciunas
2006-12-14 18:45 ` Stephen Hemminger [this message]
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=20061214104518.6ad2cc4c@freekitty \
--to=shemminger@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=silviu.craciunas@sbg.ac.at \
/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.