"Fossies" - the Fresh Open Source Software Archive

Member "vnstat-2.9/src/datacache.h" (6 Jul 2019, 822 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 "datacache.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef DATACACHE_H
    2 #define DATACACHE_H
    3 
    4 typedef struct datacache {
    5     char interface[32];
    6     short active;
    7     short filled;
    8     short syncneeded;
    9     uint64_t currx, curtx;
   10     time_t updated;
   11     struct xferlog *log;
   12     struct datacache *next;
   13 } datacache;
   14 
   15 typedef struct xferlog {
   16     time_t timestamp;
   17     uint64_t rx, tx;
   18     struct xferlog *next;
   19 } xferlog;
   20 
   21 int datacache_add(datacache **dc, const char *interface, const short sync);
   22 int datacache_remove(datacache **dc, const char *interface);
   23 void datacache_clear(datacache **dc);
   24 int datacache_count(datacache **dc);
   25 int datacache_activecount(datacache **dc);
   26 void datacache_debug(datacache **dc);
   27 
   28 int xferlog_add(xferlog **log, const time_t timestamp, const uint64_t rx, const uint64_t tx);
   29 void xferlog_clear(xferlog **log);
   30 void xferlog_debug(xferlog **log, const int newline);
   31 
   32 #endif