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)  

datacache.c File Reference
#include "common.h"
#include "datacache.h"
Include dependency graph for datacache.c:

Go to the source code of this file.

Functions

int datacache_add (datacache **dc, const char *interface, const short sync)
 
int datacache_remove (datacache **dc, const char *interface)
 
void datacache_clear (datacache **dc)
 
int datacache_count (datacache **dc)
 
int datacache_activecount (datacache **dc)
 
void datacache_debug (datacache **dc)
 
int xferlog_add (xferlog **log, const time_t timestamp, const uint64_t rx, const uint64_t tx)
 
void xferlog_clear (xferlog **log)
 
void xferlog_debug (xferlog **log, const int newline)
 

Function Documentation

◆ datacache_activecount()

int datacache_activecount ( datacache **  dc)

Definition at line 90 of file datacache.c.

References datacache::active, and datacache::next.

Referenced by adjustsaveinterval().

◆ datacache_add()

int datacache_add ( datacache **  dc,
const char *  interface,
const short  sync 
)

Definition at line 4 of file datacache.c.

References datacache::next, and strncpy_nt().

Referenced by addinterfaces(), filldatabaselist(), and rescandatabaseforinterfaces().

◆ datacache_clear()

void datacache_clear ( datacache **  dc)

Definition at line 66 of file datacache.c.

References datacache::log, datacache::next, and xferlog_clear().

Referenced by errorexitdaemon(), handleintsignals(), and main().

◆ datacache_count()

int datacache_count ( datacache **  dc)

Definition at line 78 of file datacache.c.

References datacache::next.

Referenced by datacache_status().

◆ datacache_debug()

void datacache_debug ( datacache **  dc)

Definition at line 104 of file datacache.c.

References datacache::interface, datacache::log, datacache::next, and xferlog_debug().

Referenced by main().

◆ datacache_remove()

int datacache_remove ( datacache **  dc,
const char *  interface 
)

Definition at line 27 of file datacache.c.

References datacache::log, datacache::next, and xferlog_clear().

Referenced by cleanremovedinterfaces().

◆ xferlog_add()

int xferlog_add ( xferlog **  log,
const time_t  timestamp,
const uint64_t  rx,
const uint64_t  tx 
)

Definition at line 125 of file datacache.c.

References xferlog::next, xferlog::rx, xferlog::timestamp, and xferlog::tx.

Referenced by processifinfo().

◆ xferlog_clear()

void xferlog_clear ( xferlog **  log)

Definition at line 148 of file datacache.c.

References xferlog::next.

Referenced by datacache_clear(), datacache_remove(), and flushcachetodisk().

◆ xferlog_debug()

void xferlog_debug ( xferlog **  log,
const int  newline 
)

Definition at line 159 of file datacache.c.

References xferlog::next, xferlog::rx, xferlog::timestamp, and xferlog::tx.

Referenced by datacache_debug().