capt_get_packet(): check for key press only every 20ms
[iptraf-ng.git] / src / counters.h
blob1746d0c9791a1c851f4ffbc2030f64078639ab92
1 #ifndef IPTRAF_NG_COUNTERS_H
2 #define IPTRAF_NG_COUNTERS_H
4 struct pkt_counter {
5 unsigned long long pc_packets;
6 unsigned long long pc_bytes;
7 };
9 struct proto_counter {
10 struct pkt_counter proto_total;
11 struct pkt_counter proto_in;
12 struct pkt_counter proto_out;
15 void pkt_counter_update(struct pkt_counter *count, int bytes);
16 void pkt_counter_reset(struct pkt_counter *count);
18 void proto_counter_update(struct proto_counter *proto_counter, int outgoing,
19 int bytes);
20 void proto_counter_reset(struct proto_counter *proto_counter);
22 #endif /* IPTRAF_NG_COUNTERS_H */