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)  

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

Go to the source code of this file.

Functions

void showjson (const char *interface, const int ifcount, const char mode, const char *databegin, const char *dataend)
 
void jsondump (const interfaceinfo *interface, const char *tablename, const int datetype, const char *databegin, const char *dataend)
 
void jsondate (const time_t *date, const int type)
 
void jsonheader (void)
 
void jsonfooter (void)
 

Function Documentation

◆ jsondate()

void jsondate ( const time_t *  date,
const int  type 
)

Definition at line 104 of file dbjson.c.

Referenced by jsondump(), and showjson().

◆ jsondump()

void jsondump ( const interfaceinfo interface,
const char *  tablename,
const int  datetype,
const char *  databegin,
const char *  dataend 
)

Definition at line 76 of file dbjson.c.

References cfg, db_getdata_range(), dbdatalistfree(), jsondate(), CFG::listjsonxml, and interfaceinfo::name.

Referenced by showjson().

◆ jsonfooter()

void jsonfooter ( void  )

Definition at line 137 of file dbjson.c.

Referenced by handleshowdata(), and showoneinterface().

◆ jsonheader()

void jsonheader ( void  )

Definition at line 132 of file dbjson.c.

References getversion(), and JSONVERSION.

Referenced by handleshowdata(), and showoneinterface().

◆ showjson()

void showjson ( const char *  interface,
const int  ifcount,
const char  mode,
const char *  databegin,
const char *  dataend 
)