forked from vergoh/vnstat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vnstat_func.h
37 lines (34 loc) · 1.17 KB
/
vnstat_func.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
31
32
33
34
35
36
37
#ifndef VNSTAT_FUNC__H
#define VNSTAT_FUNC__H
typedef struct {
int query, setalias;
int addiface, force, traffic;
int livetraffic, defaultiface, removeiface, renameiface, livemode;
int32_t limit;
uint64_t dbifcount;
char interface[MAXIFPARAMLEN], alias[32], newifname[MAXIFLEN], filename[512];
char definterface[MAXIFPARAMLEN], cfgfile[512], *ifacelist, jsonmode, xmlmode;
char databegin[18], dataend[18];
unsigned int alert, alertoutput, alertexit, alerttype, alertcondition;
uint64_t alertlimit;
} PARAMS;
void initparams(PARAMS *p);
void showhelp(PARAMS *p);
void showlonghelp(PARAMS *p);
void parseargs(PARAMS *p, const int argc, char **argv);
int parsealertargs(PARAMS *p, char **argv);
void showalerthelp(void);
void showstylehelp(void);
void handleshowalert(PARAMS *p);
void handleremoveinterface(PARAMS *p);
void handlerenameinterface(PARAMS *p);
void handleaddinterface(PARAMS *p);
void handlesetalias(PARAMS *p);
void handleshowdata(PARAMS *p);
void showoneinterface(PARAMS *p);
void handletrafficmeters(PARAMS *p);
void handleifselection(PARAMS *p);
void showiflist(const int parseable);
void showdbiflist(const int parseable);
void validateinterface(PARAMS *p);
#endif