Lines Matching defs:length
200 * @param length size of the pbuf's payload
224 pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
228 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length));
233 p = pbuf_alloc_reference(NULL, length, type);
237 u16_t rem_len; /* remaining length */
240 rem_len = length;
274 mem_size_t payload_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
278 if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
279 (alloc_len < LWIP_MEM_ALIGN_SIZE(length))) {
289 length, length, type, 0);
298 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
312 * @param length size of the pbuf's payload
327 pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type)
339 pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
351 * @param length size of the pbuf's payload
356 * must be at least big enough to hold 'length' plus the header size,
360 * big enough to hold 'length' plus the header size
363 pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p,
368 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length));
370 if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) {
371 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length));
380 pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
387 * Shrink a pbuf chain to a desired length.
390 * @param new_len desired new length of pbuf chain
392 * Depending on the desired length, the first few pbufs in a chain might
405 u16_t rem_len; /* remaining length */
410 /* desired length larger than current length? */
425 /* decrease remaining length by pbuf length */
427 /* decrease total length indicator */
434 /* rem_len == desired length for pbuf q */
437 /* (other types merely adjust their length fields */
443 /* reallocate and adjust the length of the pbuf that will be split */
447 /* adjust length fields for new last pbuf */
603 /* increase payload pointer (guarded by length check above) */
605 /* modify pbuf length fields */
862 /* add total length of second chain to all totals of first chain */
868 /* add total length of second chain to last pbuf total of first chain */
926 /* total length of pbuf p is its own length only */
1055 * @param len length of data to copy (dataptr must be big enough). No more
1102 * @param len length of data to copy (dataptr must be big enough). No more
1136 * This method modifies a 'pbuf chain', so that its total length is
1155 /* continue until the total length (summed up as u16_t) overflows */
1225 * @param len length of the application supplied data buffer
1268 * @param len length of the application supplied data buffer
1329 * Allocates a new pbuf of same length (via pbuf_alloc()) and copies the source
1362 * @param len length of data to copy into the pbuf
1458 * Compare pbuf contents at specified offset with memory s2, both of length n
1463 * @param n length of buffer to compare
1499 * Find occurrence of mem (with length mem_len) in pbuf p, starting at offset
1502 * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as
1505 * @param mem_len length of 'mem'
1526 * Find occurrence of substr with length substr_len in pbuf p, start at offset
1531 * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as
1533 * @param substr string to search for in p, maximum length is 0xFFFE