re-factor iface screen code (M. Dolze)
This commit is contained in:
1 parent
6b9bfd085d
commit
2ff1b58edb
11 files changed
+244
-176
No files matched your search
@@ -27,6 +27,40 @@ typedef struct
|
||||
int number;
|
||||
} procinfo_type;
|
||||
|
||||
/* status definitions for network interfaces */
|
||||
typedef enum {
|
||||
down = 0,
|
||||
up = 1,
|
||||
} IfaceStatus;
|
||||
|
||||
/* Struct for network interface values (transmision, reception, etc..) */
|
||||
typedef struct iface_info
|
||||
{
|
||||
/* interface name and alias (=display name) */
|
||||
char *name;
|
||||
char *alias;
|
||||
|
||||
IfaceStatus status;
|
||||
|
||||
time_t last_online;
|
||||
|
||||
/* received bytes */
|
||||
double rc_byte;
|
||||
double rc_byte_old;
|
||||
|
||||
/* transmited bytes */
|
||||
double tr_byte;
|
||||
double tr_byte_old;
|
||||
|
||||
/* received packets */
|
||||
double rc_pkt;
|
||||
double rc_pkt_old;
|
||||
|
||||
/* transmited packets */
|
||||
double tr_pkt;
|
||||
double tr_pkt_old;
|
||||
} IfaceInfo;
|
||||
|
||||
int machine_init();
|
||||
int machine_close();
|
||||
|
||||
@@ -38,5 +72,7 @@ int machine_get_meminfo(meminfo_type *result);
|
||||
int machine_get_procs(LinkedList *procs);
|
||||
int machine_get_smpload(load_type *result, int *numcpus);
|
||||
int machine_get_uptime(double *up, double *idle);
|
||||
int machine_get_iface_stats (IfaceInfo *interface);
|
||||
|
||||
|
||||
#endif /* _lcdproc_machine_h_ */
|
||||
Reference in new issue
Block a user