Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / miniupnpd / bsd / testgetifstats.c
blob4dff8508ebdd1854ca02ce4ef51faa129f35d7aa
1 /* MiniUPnP project
2 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
3 * (c) 2006 Thomas Bernard
4 * This software is subject to the conditions detailed
5 * in the LICENCE file provided within the distribution */
7 #include <stdio.h>
9 #include "../getifstats.h"
11 int
12 main(int argc, char * * argv)
14 int r;
15 struct ifdata data;
16 printf("usage: %s if_name\n", argv[0]);
17 if(argc<2)
18 return -1;
19 r = getifstats(argv[1], &data);
20 if(r<0)
21 printf("getifstats() failed\n");
22 else
24 printf("ipackets = %10lu opackets = %10lu\n",
25 data.ipackets, data.opackets);
26 printf("ibytes = %10lu obytes = %10lu\n",
27 data.ibytes, data.obytes);
28 printf("baudrate = %10lu\n", data.baudrate);
30 return 0;