ap->rpkt = skb; 
ppp_async_input(struct asyncppp *ap, const unsigned char *buf,		char *flags, int count){	struct sk_buff *skb;	int c, i, j, n, s, f;	unsigned char *sp;	/* update bits used for 8-bit cleanness detection */	if (~ap->rbits & SC_RCV_BITS) {		s = 0;		for (i = 0; i < count; ++i) {			c = buf[i];			if (flags != 0 && flags[i] != 0)				continue;			s |= (c & 0x80)? SC_RCV_B7_1: SC_RCV_B7_0;			c = ((c >> 4) ^ c) & 0xf;			s |= (0x6996 & (1 << c))? SC_RCV_ODDP: SC_RCV_EVNP;		}		ap->rbits |= s;	}	while (count > 0) {		/* scan through and see how many chars we can do in bulk */		if ((ap->state & SC_ESCAPE) && buf[0] == PPP_ESCAPE)			n = 1;		else			n = scan_ordinary(ap, buf, count);		f = 0;		if (flags != 0 && (ap->state & SC_TOSS) == 0) {			/* check the flags to see if any char had an error */			for (j = 0; j < n; ++j)				if ((f = flags[j]) != 0)					break;		}		if (f != 0) {			/* start tossing */			ap->state |= SC_TOSS;		} else if (n > 0 && (ap->state & SC_TOSS) == 0) {			/* stuff the chars in the skb */			skb = ap->rpkt;			if (skb == 0) {				skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2);				if (skb == 0)					goto nomem;				/* Try to get the payload 4-byte aligned */				if (buf[0] != PPP_ALLSTATIONS)					skb_reserve(skb, 2 + (buf[0] & 1));				ap->rpkt = skb;			}			if (n > skb_tailroom(skb)) {				/* packet overflowed MRU */				ap->state |= SC_TOSS;			} else {				sp = skb_put(skb, n);				memcpy(sp, buf, n);				if (ap->state & SC_ESCAPE) {					sp[0] ^= 0x20;					ap->state &= ~SC_ESCAPE;				}			}		}		if (n >= count)			break;		c = buf[n];		if (flags != NULL && flags[n] != 0) {			ap->state |= SC_TOSS;		} else if (c == PPP_FLAG) {			process_input_packet(ap);		} else if (c == PPP_ESCAPE) {			ap->state |= SC_ESCAPE;		} else if (I_IXON(ap->tty)) {			if (c == START_CHAR(ap->tty))				start_tty(ap->tty);			else if (c == STOP_CHAR(ap->tty))				stop_tty(ap->tty);		}		/* otherwise it's a char in the recv ACCM */		++n;		buf += n;		if (flags != 0)			flags += n;		count -= n;	}	return; nomem:	printk(KERN_ERR "PPPasync: no memory (input pkt)\n");	ap->state |= SC_TOSS;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6722e78c90054101e6797d5944cdc81af9897a0a/ppp_async.c/clean/drivers/net/ppp_async.c