home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 024 / psi110g.zip / ECCMD.C < prev    next >
C/C++ Source or Header  |  1994-04-17  |  1KB  |  39 lines

  1. /* 3C501 commands
  2.  * Copyright 1991 Phil Karn, KA9Q
  3.  */
  4. #include "global.h"
  5. #ifdef PC_EC
  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",
  23.         (unsigned int)((ecp-Ec) / sizeof(struct ec)),buf);
  24.   
  25.         tprintf("recv      bad       overf     drop      nomem     intrpt\n");
  26.         tprintf("%-10lu%-10lu%-10lu%-10lu%-10lu%-10lu\n",
  27.         ecp->estats.recv,ecp->estats.bad,ecp->estats.over,
  28.         ecp->estats.drop,ecp->estats.nomem,ecp->estats.intrpt);
  29.   
  30.         tprintf("xmit      timeout   jam       jam16\n");
  31.         if(tprintf("%-10lu%-10lu%-10lu%-10lu\n",
  32.             ecp->estats.xmit,ecp->estats.timeout,ecp->estats.jam,
  33.             ecp->estats.jam16) == EOF)
  34.             break;
  35.     }
  36.     return 0;
  37. }
  38. #endif /* PC_EC */
  39.