Lines Matching refs:len
109 int len, faclen = 0;
111 len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 1;
115 len += 1 + ROSE_ADDR_LEN + ROSE_ADDR_LEN;
117 len += faclen;
122 len += 2;
126 if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL)
239 static int rose_parse_national(unsigned char *p, struct rose_facilities_struct *facilities, int len)
248 if (len < 2)
252 len -= 2;
256 if (len < 3)
262 len -= 3;
266 if (len < 4)
270 len -= 4;
274 if (len < 2)
277 if (len < 2 + l)
325 len -= l + 2;
328 } while (*p != 0x00 && len > 0);
333 static int rose_parse_ccitt(unsigned char *p, struct rose_facilities_struct *facilities, int len)
341 if (len < 2)
345 len -= 2;
349 if (len < 3)
353 len -= 3;
357 if (len < 4)
361 len -= 4;
365 if (len < 2)
387 len -= l + 2;
390 } while (*p != 0x00 && len > 0);
398 int facilities_len, len;
411 len = rose_parse_national(p + 1, facilities, facilities_len - 1);
415 len = rose_parse_ccitt(p + 1, facilities, facilities_len - 1);
420 len = 1;
424 if (len < 0)
426 if (WARN_ON(len >= facilities_len))
428 facilities_len -= len + 1;
429 p += len + 1;
440 int len, nb;
524 len = p - buffer;
525 buffer[0] = len - 1;
527 return len;