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)  

image.h
Go to the documentation of this file.
1#ifndef IMAGE_H
2#define IMAGE_H
3
4#include <gd.h> /* libgd2-dev libgd2 */
5#include <gdfontt.h> /* gdFontGetTiny() */
6#include <gdfonts.h> /* gdFontGetSmall() */
7#include <gdfontmb.h> /* gdFontGetMediumBold() */
8#include <gdfontl.h> /* gdFontGetLarge() */
9#include <gdfontg.h> /* gdFontGetGiant() */
10
11/* rectangle size */
12#define YBEGINOFFSET (-1)
13
14#define FIVEMINHEIGHTOFFSET 4
15#define FIVEMINWIDTHFULLPADDING 10
16#define FIVEMINWIDTHPADDING 2
17#define FIVEMINEXTRASPACE 78
18
19#define SCALEMINPIXELS 25
20
21typedef struct {
22 gdImagePtr im;
23 gdFontPtr font;
25 int cbackground, cedge, cheader, cheadertitle, cheaderdate, ctext, cline, clinel, cvnstat;
26 int crx, crxd, ctx, ctxd, cbgoffset, cbgoffsetmore, showheader, showedge, showlegend, altdate;
27 int lineheight, large;
28 char headertext[65], databegin[18], dataend[18];
29 time_t current;
31
32typedef struct {
33 time_t date;
34 uint64_t rx, tx;
35} HOURDATA;
36
38void drawimage(IMAGECONTENT *ic);
39#if HAVE_DECL_GD_NEAREST_NEIGHBOUR
40void scaleimage(IMAGECONTENT *ic);
41#endif
42int drawhours(IMAGECONTENT *ic, const int xpos, const int ypos, const int rate);
43void drawhourly(IMAGECONTENT *ic, const int rate);
44void drawlist(IMAGECONTENT *ic, const char *listname);
45void drawsummary(IMAGECONTENT *ic, const int layout, const int rate);
46void drawsummary_alltime(IMAGECONTENT *ic, const int x, const int y);
47void drawsummary_digest(IMAGECONTENT *ic, const int x, const int y, const char *mode);
48void drawfivegraph(IMAGECONTENT *ic, const int rate, const int resultcount, const int height);
49int drawfiveminutes(IMAGECONTENT *ic, const int xpos, const int ypos, const int rate, const int resultcount, const int height);
50
51#endif
void initimagecontent(IMAGECONTENT *ic)
Definition: image.c:8
void drawsummary(IMAGECONTENT *ic, const int layout, const int rate)
Definition: image.c:633
void drawimage(IMAGECONTENT *ic)
Definition: image.c:25
void drawsummary_digest(IMAGECONTENT *ic, const int x, const int y, const char *mode)
Definition: image.c:727
void drawsummary_alltime(IMAGECONTENT *ic, const int x, const int y)
Definition: image.c:698
void drawfivegraph(IMAGECONTENT *ic, const int rate, const int resultcount, const int height)
Definition: image.c:903
void drawhourly(IMAGECONTENT *ic, const int rate)
Definition: image.c:284
void drawlist(IMAGECONTENT *ic, const char *listname)
Definition: image.c:304
int drawhours(IMAGECONTENT *ic, const int xpos, const int ypos, const int rate)
Definition: image.c:108
int drawfiveminutes(IMAGECONTENT *ic, const int xpos, const int ypos, const int rate, const int resultcount, const int height)
Definition: image.c:921
Definition: dbshow.h:8
gdFontPtr font
Definition: image.h:23
int large
Definition: image.h:27
time_t current
Definition: image.h:29
interfaceinfo interface
Definition: image.h:24
gdImagePtr im
Definition: image.h:22
int altdate
Definition: image.h:26
int cbackground
Definition: image.h:25