/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:speedr.c 12.0$ */
/* $ACIS:speedr.c 12.0$ */
/* $Source: /ibm/acis/usr/src/old/berknet/RCS/speedr.c,v $ */

#ifndef lint
static char *rcsid = "$Header:speedr.c 12.0$";
#endif

static char sccsid[] = "@(#)speedr.c	4.1	(Berkeley)	10/2/82";

/*
	speedr.c

	with speeds.c used to time the links
*/
# include "defs.h"

/* global */
struct daemonparms netd;

main(argc,argv)
  char **argv; {
	char buf[2000];
	int savd, n;
	register int i;
	debugflg = DBV;
	setupdaemon(argc,argv);
	initseqno();
	savd = netd.dp_datasize;
	putchar('!');
	for(;;){
		netd.dp_datasize = savd;
		while(nread(&n,2) == BROKENREAD);
# ifdef SWAB
		swab(&n,&n,2);
# endif
		printf("Length = %d\n",n);
		netd.dp_datasize = n;
		for(;;){
			while((i=nread(buf,n)) == BROKENREAD);
			if(i != n)putchar('#');
			if(buf[0] == 'Z')break;
			}
		}
	}
