11 #include <linux/module.h>
13 #include <linux/errno.h>
15 #include <linux/netdevice.h>
32 static struct appldata_net_sum_data {
62 static
void appldata_get_net_sum_data(
void *
data)
65 struct appldata_net_sum_data *net_data;
71 net_data->sync_count_1++;
90 rx_packets += stats->rx_packets;
91 tx_packets += stats->tx_packets;
92 rx_bytes += stats->rx_bytes;
93 tx_bytes += stats->tx_bytes;
94 rx_errors += stats->rx_errors;
95 tx_errors += stats->tx_errors;
96 rx_dropped += stats->rx_dropped;
97 tx_dropped += stats->tx_dropped;
98 collisions += stats->collisions;
103 net_data->nr_interfaces =
i;
115 net_data->sync_count_2++;
122 .size =
sizeof(
struct appldata_net_sum_data),
123 .
callback = &appldata_get_net_sum_data,
124 .data = &appldata_net_sum_data,
126 .mod_lvl = {0xF0, 0xF0},
135 static int __init appldata_net_init(
void)
145 static void __exit appldata_net_exit(
void)