#include #include #include #include #include #include /** Timer */ //extern struct timer_list estimator_timer; /** We assume that the list of devices in dev_base does not change and * hence once the list of usage is built for each device, we assume that * there is a one-to-one correspondence in the list of devices and the * list of usage structures. */ /** Usage structure list */ struct bwusage { struct bwusage *next; char *name; unsigned long rx_bps; unsigned long rx_avbps; unsigned long rx_pps; unsigned long rx_avpps; unsigned long rx_bytes; unsigned long rx_total_bytes; unsigned long rx_packets; unsigned long rx_total_packets; unsigned long tx_bps; unsigned long tx_avbps; unsigned long tx_pps; unsigned long tx_avpps; unsigned long tx_bytes; unsigned long tx_total_bytes; unsigned long tx_packets; unsigned long tx_total_packets; }; extern struct bwusage *bwusage_head; /** bwusage_head lock */ extern rwlock_t bwusage_head_lock;