vnstat
2.9
About: vnStat is a console-based network traffic monitor (using the /proc filesystem).
![]() ![]() |
#include "iflist.h"
Go to the source code of this file.
Functions | |
int | getifinfo (const char *iface) |
int | getifliststring (char **ifacelist, int showspeed) |
int | getiflist (iflist **ifl, const int getspeed, const int validate) |
int | readproc (const char *iface) |
int | readsysclassnet (const char *iface) |
uint32_t | getifspeed (const char *iface) |
int | isifavailable (const char *iface) |
int | isifvalid (const char *iface) |
int | istun (const char *iface) |
int getifinfo | ( | const char * | iface | ) |
Definition at line 5 of file ifinfo.c.
References cfg, debug, errorstring, IFINFO::filled, CFG::iface, ifinfo, CFG::is64bit, IFINFO::is64bit, printe(), PROCNETDEV, PT_Error, readproc(), readsysclassnet(), strncpy_nt(), and IFINFO::timestamp.
Referenced by addinterfaces(), handleaddinterface(), isifavailable(), livetrafficmeter(), processdatacache(), and trafficmeter().
int getiflist | ( | iflist ** | ifl, |
const int | getspeed, | ||
const int | validate | ||
) |
Definition at line 108 of file ifinfo.c.
References cfg, and CFG::maxbw.
Referenced by addinterfaces(), getifliststring(), handleifselection(), and showiflist().
int getifliststring | ( | char ** | ifacelist, |
int | showspeed | ||
) |
Definition at line 64 of file ifinfo.c.
References getiflist(), iflistfree(), and panicexit().
Referenced by handleaddinterface(), handletrafficmeters(), interfacechangecheck(), main(), and showiflist().
uint32_t getifspeed | ( | const char * | iface | ) |
int isifavailable | ( | const char * | iface | ) |
Definition at line 461 of file ifinfo.c.
References disableprints, and getifinfo().
Referenced by handletrafficmeters().
int readproc | ( | const char * | iface | ) |
Definition at line 218 of file ifinfo.c.
References debug, IFINFO::filled, ifinfo, IFINFO::name, noexit, PROCNETDEV, IFINFO::rx, IFINFO::rxp, strncpy_nt(), IFINFO::tx, and IFINFO::txp.
Referenced by getifinfo().
int readsysclassnet | ( | const char * | iface | ) |
Definition at line 272 of file ifinfo.c.
References debug, IFINFO::filled, ifinfo, IFINFO::name, noexit, IFINFO::rx, IFINFO::rxp, strncpy_nt(), SYSCLASSNET, IFINFO::tx, and IFINFO::txp.
Referenced by getifinfo().