Lines Matching defs:buf
100 static void ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
262 unsigned char *buf, size_t count,
274 const unsigned char *buf, size_t count)
342 ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
351 ppp_async_input(ap, buf, cflags, count);
525 #define PUT_BYTE(ap, buf, c, islcp) do { \
527 *buf++ = PPP_ESCAPE; \
528 *buf++ = c ^ PPP_TRANS; \
530 *buf++ = c; \
537 unsigned char *buf, *buflim;
541 buf = ap->obuf;
542 ap->olim = buf;
543 ap->optr = buf;
567 *buf++ = PPP_FLAG;
575 PUT_BYTE(ap, buf, 0xff, islcp);
577 PUT_BYTE(ap, buf, 0x03, islcp);
588 while (i < count && buf < buflim) {
593 PUT_BYTE(ap, buf, c, islcp);
600 ap->olim = buf;
611 PUT_BYTE(ap, buf, c, islcp);
613 PUT_BYTE(ap, buf, c, islcp);
614 *buf++ = PPP_FLAG;
615 ap->olim = buf;
753 /* see how many ordinary chars there are at the start of buf */
755 scan_ordinary(struct asyncppp *ap, const unsigned char *buf, int count)
760 c = buf[i];
836 ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
847 c = buf[i];
859 if ((ap->state & SC_ESCAPE) && buf[0] == PPP_ESCAPE)
862 n = scan_ordinary(ap, buf, count);
889 * enough chars here to test buf[1] and buf[2].
891 if (buf[0] != PPP_ALLSTATIONS)
892 skb_reserve(skb, 2 + (buf[0] & 1));
898 sp = skb_put_data(skb, buf, n);
909 c = buf[n];
925 buf += n;