~kris/9p

9hist

1008f85715a49c6f79530a817c784b280c81bbb7 — David du Colombier 23 years ago 5defe39
Plan 9 from Bell Labs 2003-03-04
3 files changed, 12 insertions(+), 3 deletions(-)

M ip/ip.h
M pc/wavelan.c
M port/qio.c
M ip/ip.h => ip/ip.h +1 -1
@@ 35,7 35,7 @@ enum
	Maxproto=	20,
	Nhash=		64,
	Maxincall=	5,
	Nchans=		512,
	Nchans=		1024,
	MAClen=		16,		/* longest mac address */

	MAXTTL=		255,

M pc/wavelan.c => pc/wavelan.c +5 -0
@@ 566,7 566,11 @@ w_scaninfo(Ether* ether, Ctlr *ctlr, int len)
	for (i = 0; i < len ; i++)
		scanbuf[i] = csr_ins(ctlr, WR_Data1);

	/* calculate number of samples */
	len /= 25;
	if(len == 0)
		goto out;

	i = ether->scan;
	ep = &ether->f[Ntypes];
	for(fp = ether->f; fp < ep && i > 0; fp++){


@@ 589,6 593,7 @@ w_scaninfo(Ether* ether, Ctlr *ctlr, int len)
		qpass(f->in, bp);
		i--;
	}
out:
	free(scanbuf);
}


M port/qio.c => port/qio.c +6 -2
@@ 225,8 225,12 @@ pullupblock(Block *bp, int n)
			nbp->rp += n;
			QDEBUG checkb(bp, "pullupblock 1");
			return bp;
		}
		else {
		} else {
			/* shouldn't happen but why crash if it does */
			if(i < 0){
				print("pullup negative length packet\n");
				i = 0;
			}
			memmove(bp->wp, nbp->rp, i);
			pullupblockcnt++;
			bp->wp += i;