home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR3
/
KA9Q212.ZIP
/
ECCMD.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-16
|
1KB
|
45 lines
/* 3C501 commands
* Copyright 1991 Phil Karn, KA9Q
*/
/****************************************************************************
* $Id: eccmd.c 1.2 93/07/16 11:44:31 ROOT_DOS Exp $
* 15 Jul 93 1.2 GT Fix warnings. *
****************************************************************************/
#include <stdio.h>
#include "global.h"
#include "mbuf.h"
#include "iface.h"
#include "ec.h"
#include "enet.h"
#include "ip.h"
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++){
pether(buf,ecp->iface->hwaddr);
tprintf("Controller %u, Ethernet address %s\n",ecp-Ec,buf);
tprintf("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);
tprintf("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;
}