"Fossies" - the Fresh Open Source Software Archive 
Member "vnstat-2.9/src/dbshow.h" (21 Jan 2022, 1299 Bytes) of package /linux/misc/vnstat-2.9.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "dbshow.h" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
2.8_vs_2.9.
1 #ifndef DBSHOW_H
2 #define DBSHOW_H
3
4 #define DATEBUFFLEN 64
5 #define HGLINES 15
6 #define ALERTUSAGELEN 59
7
8 typedef struct {
9 time_t date;
10 uint64_t rx, tx;
11 } HOURDATA;
12
13 typedef enum AlertOutput {
14 AO_No_Output = 0,
15 AO_Always_Output,
16 AO_Output_On_Estimate,
17 AO_Output_On_Limit
18 } AlertOutput;
19
20 typedef enum AlertExit {
21 AE_Always_Exit_0 = 0,
22 AE_Always_Exit_1,
23 AE_Exit_1_On_Estimate,
24 AE_Exit_1_On_Limit
25 } AlertExit;
26
27 typedef enum AlertType {
28 AT_None = 0,
29 AT_Hour,
30 AT_Day,
31 AT_Month,
32 AT_Year
33 } AlertType;
34
35 typedef enum AlertCondition {
36 AC_None = 0,
37 AC_RX,
38 AC_TX,
39 AC_Total,
40 AC_RX_Estimate,
41 AC_TX_Estimate,
42 AC_Total_Estimate
43 } AlertCondition;
44
45 void showdb(const char *interface, int qmode, const char *databegin, const char *dataend);
46 void showsummary(const interfaceinfo *interface, const int shortmode);
47 void showlist(const interfaceinfo *interface, const char *listname, const char *databegin, const char *dataend);
48 void showoneline(const interfaceinfo *interface);
49 void showhours(const interfaceinfo *interface);
50 int showbar(const uint64_t rx, const uint64_t tx, const uint64_t max, const int len);
51 void indent(int i);
52 int showalert(const char *interface, const AlertOutput output, const AlertExit exit, const AlertType type, const AlertCondition condition, const uint64_t limit);
53
54 #endif