From: Ben Hutchings <bhutchings@solarflare.com>
To: Rami Rosen <ramirose@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Question about /proc/net/netlink mystery
Date: Wed, 20 May 2009 20:51:03 +0100 [thread overview]
Message-ID: <1242849063.6618.64.camel@achroite> (raw)
In-Reply-To: <eb3ff54b0905201222t6ecc241bq2168538742b48deb@mail.gmail.com>
On Wed, 2009-05-20 at 22:22 +0300, Rami Rosen wrote:
> Hi,
> I tried to figure this out, but something is mysterious here to me.
>
> cat /proc/net/netlink
> shows:
> sk Eth Pid Groups Rmem Wmem Dump Locks
>
> Why is the Eth here in the second column title?
> It does not seem that this column has anything to do with network
> interfaces.
>
> A short look to the code, in netlink_seq_show() , net/netlink/af_netlink.c,
> will show that the values in this column are s->sk_protocol.
I would guess that "Eth" is meant to be short for "Ethertype", a
layer-3 protocol number, although sock::sk_protocol actually holds a
layer-4 protocol number.
> So it seems that the title should be here different; it should represent
> the protocol (since s->sk_protocol is assigned
> the number of the protocol of the netlink socket ;
> for example, NETLINK_ROUTE is 0, NETLINK_AUDIT is 9, and so on ; (see
> include/linux/netfilter.h)
>
> So shouldn't it be something like "Proto"?
Yes, but changing column names in /proc risks breaking the programs that
read them.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2009-05-20 19:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 19:22 Question about /proc/net/netlink mystery Rami Rosen
2009-05-20 19:44 ` Neil Horman
2009-05-20 19:51 ` Ben Hutchings [this message]
2009-05-21 3:54 ` David Miller
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=1242849063.6618.64.camel@achroite \
--to=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=ramirose@gmail.com \
/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.