Jens Köhler wrote:
> Hello Gilles,
>
> thank you for the patch. I patched the source file, recompiled the source
> file. When I now use the rtifconfig command I do not get a statistic. Have
> you an example for a per-driver callback?
>
> rteth0 Medium: Ethernet Hardware address: 00:00:00:01:00:01
> IP address: 172.23.0.17 Broadcast address: 172.23.255.255
> UP BROADCAST RUNNING MTU: 1500
>
>
> Thanks,
> Jens
I am glad to learn that it at least compiles.
I am preparing the patch for per-driver callbacks, and have not finished
yet. A typical get_stats loopback looks like this:
static struct net_device_stats *rtl8139_get_stats(struct rtnet_device
*rtdev)
{
struct rtl8139_private *tp = rtdev->priv;
return &tp->stats;
}
Then, in the rtl8139_init_one function, you have to add:
rtdev->get_stats = rtl8139_get_stats;
That is all !
--
Gilles.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers