--- projects/libstatgrab/src/statgrab/statgrab.c 2004/02/18 17:29:15 1.21 +++ projects/libstatgrab/src/statgrab/statgrab.c 2004/04/04 21:59:16 1.23 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: statgrab.c,v 1.21 2004/02/18 17:29:15 ats Exp $ + * $Id: statgrab.c,v 1.23 2004/04/04 21:59:16 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -363,6 +363,16 @@ void populate_net() { "net", name, "tx", NULL); add_stat(LONG_LONG, &net[i].rx, "net", name, "rx", NULL); + add_stat(LONG_LONG, &net[i].ipackets, + "net", name, "ipackets", NULL); + add_stat(LONG_LONG, &net[i].opackets, + "net", name, "opackets", NULL); + add_stat(LONG_LONG, &net[i].ierrors, + "net", name, "ierrors", NULL); + add_stat(LONG_LONG, &net[i].oerrors, + "net", name, "oerrors", NULL); + add_stat(LONG_LONG, &net[i].collisions, + "net", name, "collisions", NULL); add_stat(TIME_T, &net[i].systime, "net", name, "systime", NULL); } @@ -456,6 +466,7 @@ void get_stats() { /* Print the value of a stat. */ void print_stat_value(const stat *s) { void *v = s->stat; + long l; switch (s->type) { case LONG_LONG: @@ -463,7 +474,8 @@ void print_stat_value(const stat *s) { break; case TIME_T: /* FIXME option for formatted time? */ - printf("%ld", *(time_t *)v); + l = *(time_t *)v; + printf("%ld", l); break; case FLOAT: printf("%f", *(float *)v);