netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ip6_dst_dev for IPv4
@ 2010-03-26 16:59 Mattias Rönnblom
  0 siblings, 0 replies; only message in thread
From: Mattias Rönnblom @ 2010-03-26 16:59 UTC (permalink / raw)
  To: netdev

Hi,

I'm implemeting per-interface SNMP-style network statistics for IPv4,
just like what already exists in the current kernel for IPv6
(/proc/net/dev_snmp6).

For output packets one needs to determine the output interface, and
the v6 statistics uses the ip6_dst_idev() function (ip6_fib.h). I
can't seem to find a corresponding function for IPv4. Is there?

Would someting like:
struct in_device* out_dev = in_dev_get(skb_dst(skb)->dev);
work?

Best regards,
     Mattias


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-26 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 16:59 ip6_dst_dev for IPv4 Mattias Rönnblom

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).