#ifdef MSDOS
/* 3C501 commands
 * Copyright 1991 Phil Karn, KA9Q
 */
#include "global.h"
#ifdef PC_EC
#include "mbuf.h"
#include "iface.h"
#include "ec.h"
#include "enet.h"

#if !defined(_lint)
static char rcsid[] OPTIONAL = "$Id: eccmd.c,v 1.7 1996/12/23 20:37:36 root Exp $";
#endif

int
doetherstat(argc,argv,p)
int argc;
char *argv[];
void *p;
{
	register struct ec *ecp;
	char buf[20];

	for(ecp = Ec;ecp < &Ec[Nec]; ecp++){
		(void) pether(buf,ecp->iface->hwaddr);
		tprintf("Controller %u, Ethernet address %s\n",
		(unsigned int)((ecp-Ec) / sizeof(struct ec)),buf);

		tputs("recv      bad       overf     drop      nomem     intrpt\n");
		tprintf("%-10lu%-10lu%-10lu%-10lu%-10lu%-10lu\n",
		 ecp->estats.recv,ecp->estats.bad,ecp->estats.over,
		 ecp->estats.drop,ecp->estats.nomem,ecp->estats.intrpt);

		tputs("xmit      timeout   jam       jam16\n");
		if(tprintf("%-10lu%-10lu%-10lu%-10lu\n",
		 ecp->estats.xmit,ecp->estats.timeout,ecp->estats.jam,
		 ecp->estats.jam16) == EOF)
			break;
	}
	return 0;
}

#endif  /* PC_EC */
#endif	/* MSDOS */
