Subject: ip6_dst_dev for IPv4

From: Mattias Rönnblom <[email-masked]>
Date: Fri, 26 Mar 2010 17:59:47 +0100

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