~kris/9p

9hist

664922f301a2335564a0efaaa0b4453b00534ef7 — David du Colombier 23 years ago a93c0eb
Plan 9 from Bell Labs 2002-10-14
2 files changed, 4 insertions(+), 2 deletions(-)

M ip/icmp.c
M port/qio.c
M ip/icmp.c => ip/icmp.c +2 -2
@@ 195,12 195,12 @@ icmpttlexceeded(Fs *f, uchar *ia, Block *bp)
	Icmp	*p, *np;

	p = (Icmp *)bp->rp;
	p->vihl = IP_VER4;

	netlog(f, Logicmp, "sending icmpttlexceeded -> %V\n", p->src);
	nbp = allocb(ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8);
	nbp->wp += ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8;
	np = (Icmp *)nbp->rp;
	np->vihl = IP_VER4;
	memmove(np->dst, p->src, sizeof(np->dst));
	v6tov4(np->src, ia);
	memmove(np->data, bp->rp, ICMP_IPSIZE + 8);


@@ 224,7 224,6 @@ icmpnoconv(Fs *f, Block *bp)
	uchar	addr[IPaddrlen];

	p = (Icmp *)bp->rp;
	p->vihl = IP_VER4;

	/* only do this for unicast sources and destinations */
	v4tov6(addr, p->dst);


@@ 240,6 239,7 @@ icmpnoconv(Fs *f, Block *bp)
	nbp = allocb(ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8);
	nbp->wp += ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8;
	np = (Icmp *)nbp->rp;
	np->vihl = IP_VER4;
	memmove(np->dst, p->src, sizeof(np->dst));
	memmove(np->src, p->dst, sizeof(np->src));
	memmove(np->data, bp->rp, ICMP_IPSIZE + 8);

M port/qio.c => port/qio.c +2 -0
@@ 484,6 484,7 @@ qdiscard(Queue *q, int len)
	return sofar;
}

#ifdef sape
/*
 *  Return length that next qconsume will return
 */


@@ 522,6 523,7 @@ qblen(Queue *q)

	return len;
}
#endif sape

/*
 *  Interrupt level copy out of a queue, return # bytes copied.