--- projects/libstatgrab/examples/network_traffic.c 2004/03/08 11:58:20 1.10 +++ projects/libstatgrab/examples/network_traffic.c 2004/04/04 22:48:49 1.12 @@ -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: network_traffic.c,v 1.10 2004/03/08 11:58:20 tdb Exp $ + * $Id: network_traffic.c,v 1.12 2004/04/04 22:48:49 tdb Exp $ */ /* A very basic example of how to get the network statistics from the system @@ -42,7 +42,6 @@ int main(int argc, char **argv){ extern char *optarg; - extern int optind; int c; /* We default to 1 second updates and displaying in bytes*/ @@ -122,11 +121,11 @@ int main(int argc, char **argv){ printf("\033[%d;2H%-30s : %5.2f m", line_number++, "Network Interface Rx", network_stats->rx / (1024.00*1024.00)); printf("\033[%d;2H%-30s : %5.2f m", line_number++, "Network Interface Tx", network_stats->tx / (1024.00*1024.00)); } - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface packets in", network_stats->ipackets); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface packets out", network_stats->opackets); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface errors in", network_stats->ierrors); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface errors out", network_stats->oerrors); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface collisions", network_stats->collisions); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface packets in", network_stats->ipackets); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface packets out", network_stats->opackets); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface errors in", network_stats->ierrors); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface errors out", network_stats->oerrors); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface collisions", network_stats->collisions); printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface systime", (long) network_stats->systime); /* Add a blank line between interfaces */