Lines Matching refs:len

50 static void cbcp_input     __P((int unit, u_char *pkt, int len));
52 static int cbcp_printpkt __P((u_char *pkt, int len,
81 static void cbcp_recvreq __P((cbcp_state *us, u_char *pckt, int len));
82 static void cbcp_recvack __P((cbcp_state *us, u_char *pckt, int len));
83 static void cbcp_send __P((cbcp_state *us, int code, u_char *buf, int len));
139 u_short len; local
152 GETSHORT(len, inp);
154 if (len > pktlen) {
155 error("CBCP packet: invalid length (%d > %d)", len, pktlen);
159 len -= CBCP_MINLEN;
164 cbcp_recvreq(us, inp, len);
180 cbcp_recvack(us, inp, len);
221 int code, id, len, olen, alen; local
231 GETSHORT(len, p);
240 if (len < HEADERLEN) {
241 printer(arg, " header length %d<%d", len, HEADERLEN);
244 if (len > plen) {
245 printer(arg, " truncated (%d>%d)", len, plen);
246 len = plen;
248 len -= HEADERLEN;
254 while (len >= 2) {
263 if (olen > len) {
264 printer(arg, "trunc[%d>%d] ", olen, len);
265 olen = len;
267 len -= olen;
301 if (len > 0) {
302 if (len > 8)
305 printer(arg, "%.*B", len, p);
307 p += len;
324 int len = pcktlen; local
330 while (len > 0) {
338 len -= opt_len;
376 len = 0;
383 len = 3 + 1 + strlen(us->us_number) + 1;
384 PUTCHAR(len , bufp);
388 cbcp_send(us, CBCP_RESP, buf, len);
396 len = 3;
397 PUTCHAR(len, bufp);
399 cbcp_send(us, CBCP_RESP, buf, len);
407 len = 3;
408 PUTCHAR(len , bufp);
410 cbcp_send(us, CBCP_RESP, buf, len);
421 cbcp_send(us, code, buf, len) in cbcp_send() argument
425 int len;
432 outlen = 4 + len;
440 if (len > 0)
441 BCOPY(buf, outp, len);
450 cbcp_recvack(us, pckt, len) in cbcp_recvack() argument
453 int len;
458 if (len > 0) {