-
Notifications
You must be signed in to change notification settings - Fork 44
/
statistics.h
30 lines (26 loc) · 642 Bytes
/
statistics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
#include <pthread.h>
#define STAT_BUF_LEN 512
#define PROC_LINESIZE 256
#define PROC_LINECOUNT 32
extern int statistics_ival;
void *statistics_loop(void *ptr);
struct proc_stat_entry {
char device_name[6];
unsigned int rbytes;
unsigned int rpackets;
unsigned int rerrs;
unsigned int rdrop;
unsigned int rfifo;
unsigned int rframe;
unsigned int rcompressed;
unsigned int rmulticast;
unsigned int tbytes;
unsigned int tpackets;
unsigned int terrs;
unsigned int tdrop;
unsigned int tfifo;
unsigned int tcolls;
unsigned int tcarrier;
unsigned int tcompressed;
};