vnstat  2.9
About: vnStat is a console-based network traffic monitor (using the /proc filesystem).
  Fossies Dox: vnstat-2.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

dbshow.h
Go to the documentation of this file.
1#ifndef DBSHOW_H
2#define DBSHOW_H
3
4#define DATEBUFFLEN 64
5#define HGLINES 15
6#define ALERTUSAGELEN 59
7
8typedef struct {
9 time_t date;
10 uint64_t rx, tx;
11} HOURDATA;
12
13typedef enum AlertOutput {
19
20typedef enum AlertExit {
26
27typedef enum AlertType {
34
35typedef enum AlertCondition {
44
45void showdb(const char *interface, int qmode, const char *databegin, const char *dataend);
46void showsummary(const interfaceinfo *interface, const int shortmode);
47void showlist(const interfaceinfo *interface, const char *listname, const char *databegin, const char *dataend);
48void showoneline(const interfaceinfo *interface);
49void showhours(const interfaceinfo *interface);
50int showbar(const uint64_t rx, const uint64_t tx, const uint64_t max, const int len);
51void indent(int i);
52int showalert(const char *interface, const AlertOutput output, const AlertExit exit, const AlertType type, const AlertCondition condition, const uint64_t limit);
53
54#endif
void showoneline(const interfaceinfo *interface)
Definition: dbshow.c:559
void showlist(const interfaceinfo *interface, const char *listname, const char *databegin, const char *dataend)
Definition: dbshow.c:288
AlertOutput
Definition: dbshow.h:13
@ AO_Always_Output
Definition: dbshow.h:15
@ AO_Output_On_Estimate
Definition: dbshow.h:16
@ AO_Output_On_Limit
Definition: dbshow.h:17
@ AO_No_Output
Definition: dbshow.h:14
void showsummary(const interfaceinfo *interface, const int shortmode)
Definition: dbshow.c:60
int showalert(const char *interface, const AlertOutput output, const AlertExit exit, const AlertType type, const AlertCondition condition, const uint64_t limit)
Definition: dbshow.c:891
int showbar(const uint64_t rx, const uint64_t tx, const uint64_t max, const int len)
Definition: dbshow.c:846
void showhours(const interfaceinfo *interface)
Definition: dbshow.c:660
void indent(int i)
Definition: dbshow.c:884
void showdb(const char *interface, int qmode, const char *databegin, const char *dataend)
Definition: dbshow.c:6
AlertExit
Definition: dbshow.h:20
@ AE_Always_Exit_1
Definition: dbshow.h:22
@ AE_Exit_1_On_Estimate
Definition: dbshow.h:23
@ AE_Exit_1_On_Limit
Definition: dbshow.h:24
@ AE_Always_Exit_0
Definition: dbshow.h:21
AlertType
Definition: dbshow.h:27
@ AT_None
Definition: dbshow.h:28
@ AT_Hour
Definition: dbshow.h:29
@ AT_Year
Definition: dbshow.h:32
@ AT_Day
Definition: dbshow.h:30
@ AT_Month
Definition: dbshow.h:31
AlertCondition
Definition: dbshow.h:35
@ AC_TX
Definition: dbshow.h:38
@ AC_None
Definition: dbshow.h:36
@ AC_RX
Definition: dbshow.h:37
@ AC_RX_Estimate
Definition: dbshow.h:40
@ AC_Total_Estimate
Definition: dbshow.h:42
@ AC_Total
Definition: dbshow.h:39
@ AC_TX_Estimate
Definition: dbshow.h:41
Definition: dbshow.h:8
uint64_t rx
Definition: dbshow.h:10
time_t date
Definition: dbshow.h:9