* Question about /proc/net/netlink mystery
@ 2009-05-20 19:22 Rami Rosen
2009-05-20 19:44 ` Neil Horman
2009-05-20 19:51 ` Ben Hutchings
0 siblings, 2 replies; 4+ messages in thread
From: Rami Rosen @ 2009-05-20 19:22 UTC (permalink / raw)
To: netdev
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.
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"?
Regards,
Rami Rosen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about /proc/net/netlink mystery
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
1 sibling, 0 replies; 4+ messages in thread
From: Neil Horman @ 2009-05-20 19:44 UTC (permalink / raw)
To: Rami Rosen; +Cc: netdev
On Wed, May 20, 2009 at 10:22:46PM +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.
>
> 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"?
>
Someone might have been mistakenly thinking [Eth]ertype for that field, but
regardless, it seems wrong. Honestly, The colum should likely be proto, but who
knows what apps parsing you break if you make that change now.
Neil
> Regards,
> Rami Rosen
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about /proc/net/netlink mystery
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
2009-05-21 3:54 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2009-05-20 19:51 UTC (permalink / raw)
To: Rami Rosen; +Cc: netdev
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about /proc/net/netlink mystery
2009-05-20 19:51 ` Ben Hutchings
@ 2009-05-21 3:54 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-05-21 3:54 UTC (permalink / raw)
To: bhutchings; +Cc: ramirose, netdev
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 20 May 2009 20:51:03 +0100
> On Wed, 2009-05-20 at 22:22 +0300, Rami Rosen wrote:
>> 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.
Indeed, it's odd, but like others I don't think we can change it
at this point.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-21 3:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-05-21 3:54 ` David Miller
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).