Lines Matching refs:len
395 lcp_input(int unit, u_char *p, int len)
399 fsm_input(f, p, len);
407 lcp_extcode(fsm *f, int code, u_char id, u_char *inp, int len)
413 lcp_rprotrej(f, inp, len);
423 fsm_sdata(f, ECHOREP, id, inp, len);
427 lcp_received_echo_reply(f, id, inp, len);
446 lcp_rprotrej(fsm *f, u_char *inp, int len)
452 if (len < (int)sizeof (u_short)) {
503 lcp_sprotrej(int unit, u_char *p, int len)
510 fsm_sdata(&lcp_fsm[unit], PROTREJ, ++lcp_fsm[unit].id, p, len);
637 lcp_ackci(fsm *f, u_char *p, int len)
651 if ((len -= CILEN_VOID) < 0) \
660 if ((len -= CILEN_SHORT) < 0) \
672 if ((len -= CILEN_CHAR) < 0) \
684 if ((len -= CILEN_CHAP) < 0) \
699 if ((len -= CILEN_LONG) < 0) \
711 if ((len -= CILEN_LQR) < 0) \
738 if (len != 0) {
759 lcp_nakci(fsm *f, u_char *p, int len)
781 len >= CILEN_VOID && \
784 len -= CILEN_VOID; \
791 len >= CILEN_CHAP && \
794 len -= CILEN_CHAP; \
803 len >= CILEN_CHAR && \
806 len -= CILEN_CHAR; \
814 len >= CILEN_SHORT && \
817 len -= CILEN_SHORT; \
825 len >= CILEN_LONG && \
828 len -= CILEN_LONG; \
836 len >= CILEN_LQR && \
839 len -= CILEN_LQR; \
877 && len >= CILEN_SHORT
878 && p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) {
880 len -= cilen;
984 while (len > CILEN_VOID) {
987 if (cilen < CILEN_VOID || (len -= cilen) < 0) {
1042 if (len != 0) {
1079 lcp_rejci(fsm *f, u_char *p, int len)
1096 len >= CILEN_VOID && \
1099 len -= CILEN_VOID; \
1106 len >= CILEN_SHORT && \
1109 len -= CILEN_SHORT; \
1121 len >= CILEN_CHAP && \
1124 len -= CILEN_CHAP; \
1138 len >= CILEN_LONG && \
1141 len -= CILEN_LONG; \
1153 len >= CILEN_LQR && \
1156 len -= CILEN_LQR; \
1169 len >= CILEN_CBCP && \
1172 len -= CILEN_CBCP; \
1198 if (len != 0) {
1232 int cilen, citype; /* Parsed len, type */
1375 LCPDEBUG(LOG_WARNING, ("lcp_reqci: Reject AUTHTYPE PAP bad len\n"));
1401 LCPDEBUG(LOG_WARNING, ("lcp_reqci: Reject AUTHTYPE CHAP bad len\n"));
1730 print_string( char *p, int len, void (*printer) (void *, char *, ...), void *arg)
1735 for (; len > 0; --len) {
1774 int code, id, len, olen;
1785 GETSHORT(len, p);
1786 if (len < HEADERLEN || len > plen) {
1796 len -= HEADERLEN;
1803 while (len >= 2) {
1807 if (olen < 2 || olen > len) {
1811 len -= olen;
1903 if (len > 0 && *p >= ' ' && *p < 0x7f) {
1905 print_string((char*)p, len, printer, arg);
1906 p += len;
1907 len = 0;
1914 if (len >= 4) {
1918 len -= 4;
1924 for (; len > 0; --len) {
1979 lcp_received_echo_reply (fsm *f, int id, u_char *inp, int len)
1986 if (len < 4) {
1987 LCPDEBUG(LOG_WARNING, ("lcp: received short Echo-Reply, length %d\n", len));