Lines Matching refs:len

96 static void ccp_input __P((int unit, u_char *pkt, int len));
98 static int ccp_printpkt __P((u_char *pkt, int len,
101 static void ccp_datainput __P((int unit, u_char *pkt, int len));
143 int len));
403 ccp_input(unit, p, len)
406 int len;
415 fsm_input(f, p, len);
432 ccp_extcode(f, code, id, p, len)
436 int len;
445 fsm_sdata(f, CCP_RESETACK, id, p, len);
474 ccp_codereject(f, code, id, inp, len)
478 int len;
697 ccp_ackci(f, p, len)
700 int len;
706 if (len < CILEN_DEFLATE
712 if (p == p0 && len == 0)
715 len -= CILEN_DEFLATE;
718 if (len < CILEN_DEFLATE
724 if (p == p0 && len == 0)
727 len -= CILEN_DEFLATE;
730 if (len < CILEN_BSD_COMPRESS
735 if (p == p0 && len == 0)
738 len -= CILEN_BSD_COMPRESS;
741 if (len < CILEN_PREDICTOR_1
745 if (p == p0 && len == 0)
748 len -= CILEN_PREDICTOR_1;
751 if (len < CILEN_PREDICTOR_2
755 if (p == p0 && len == 0)
758 len -= CILEN_PREDICTOR_2;
762 if (len != 0)
772 ccp_nakci(f, p, len)
775 int len;
784 if (go->deflate && go->deflate_correct && len >= CILEN_DEFLATE &&
798 len -= p[1];
802 if (go->deflate && go->deflate_draft && len >= CILEN_DEFLATE &&
819 len -= p[1];
826 if (go->bsd_compress && len >= CILEN_BSD_COMPRESS &&
838 len -= p[1];
857 ccp_rejci(f, p, len)
860 int len;
871 if (len == 0 && all_rejected[f->unit])
874 if (go->deflate && go->deflate_correct && len >= CILEN_DEFLATE &&
881 len -= CILEN_DEFLATE;
883 if (go->deflate && go->deflate_draft && len >= CILEN_DEFLATE &&
890 len -= CILEN_DEFLATE;
894 if (go->bsd_compress && len >= CILEN_BSD_COMPRESS
900 len -= CILEN_BSD_COMPRESS;
902 if (go->predictor_1 && len >= CILEN_PREDICTOR_1
906 len -= CILEN_PREDICTOR_1;
908 if (go->predictor_2 && len >= CILEN_PREDICTOR_2
912 len -= CILEN_PREDICTOR_2;
915 if (len != 0)
939 int len, clen, type, nb;
946 len = *lenp;
949 ho->method = (len > 0)? p[0]: -1;
951 for (; len > 0; len -= clen, p += clen) {
953 if (len < 2 || p[1] > len) {
1268 int code, id, len;
1282 GETSHORT(len, p);
1286 if (len < HEADERLEN) {
1287 printer(arg, " header length %d<%d", len, HEADERLEN);
1290 if (len > plen) {
1291 printer(arg, " truncated (%d>%d)", len, plen);
1292 len = plen;
1294 len -= HEADERLEN;
1302 while (len >= 2) {
1307 if (optlen > len)
1308 optlen = len;
1311 len -= optlen;
1386 printer(arg, "typ%d len%d ", code, clen);
1402 if (len > 0) {
1403 if (len == 2) {
1406 len = 0;
1409 print_string((char *)p, len, printer, arg);
1410 p += len;
1411 len = 0;
1418 if (len > 0) {
1419 if (len > 8)
1422 printer(arg, " %.*B", len, p);
1423 p += len;
1443 ccp_datainput(unit, pkt, len)
1446 int len;