home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / network / src_1218.zip / ECCMD.C < prev    next >
C/C++ Source or Header  |  1991-01-27  |  893b  |  38 lines

  1. /* 3C501 commands
  2.  * Copyright 1991 Phil Karn, KA9Q
  3.  */
  4. #include <stdio.h>
  5. #include "global.h"
  6. #include "mbuf.h"
  7. #include "iface.h"
  8. #include "ec.h"
  9. #include "enet.h"
  10.  
  11. int
  12. doetherstat(argc,argv,p)
  13. int argc;
  14. char *argv[];
  15. void *p;
  16. {
  17.     register struct ec *ecp;
  18.     char buf[20];
  19.  
  20.     for(ecp = Ec;ecp < &Ec[Nec]; ecp++){
  21.         pether(buf,ecp->iface->hwaddr);
  22.         tprintf("Controller %u, Ethernet address %s\n",ecp-Ec,buf);
  23.  
  24.         tprintf("recv      bad       overf     drop      nomem     intrpt\n");
  25.         tprintf("%-10lu%-10lu%-10lu%-10lu%-10lu%-10lu\n",
  26.          ecp->estats.recv,ecp->estats.bad,ecp->estats.over,
  27.          ecp->estats.drop,ecp->estats.nomem,ecp->estats.intrpt);
  28.  
  29.         tprintf("xmit      timeout   jam       jam16\n");
  30.         if(tprintf("%-10lu%-10lu%-10lu%-10lu\n",
  31.          ecp->estats.xmit,ecp->estats.timeout,ecp->estats.jam,
  32.          ecp->estats.jam16) == EOF)
  33.             break;
  34.     }
  35.     return 0;
  36. }
  37.  
  38.