Lines Matching refs:length

183  * @param length size of the pbuf's payload
207 pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
211 s32_t rem_len; /* remaining length */
212 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length));
252 /* the total length of the pbuf chain is the requested size */
253 p->tot_len = length;
254 /* set the length of the first pbuf in the chain */
255 p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset));
268 /* remaining length to be allocated */
269 rem_len = length - p->len;
285 /* set total length of this pbuf and next in chain */
288 /* this pbuf length is pool size, unless smaller sized tail */
297 /* calculate remaining length to be allocated */
308 p = (struct pbuf*)mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length));
314 p->len = p->tot_len = length;
335 p->len = p->tot_len = length;
347 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
355 * @param length size of the pbuf's payload
360 * must be at least big enough to hold 'length' plus the header size,
364 * big enough to hold 'length' plus the header size
367 pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p,
371 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length));
395 if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) {
396 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length));
407 p->pbuf.len = p->pbuf.tot_len = length;
415 * Shrink a pbuf chain to a desired length.
418 * @param new_len desired new length of pbuf chain
420 * Depending on the desired length, the first few pbufs in a chain might
433 u16_t rem_len; /* remaining length */
442 /* desired length larger than current length? */
457 /* decrease remaining length by pbuf length */
459 /* decrease total length indicator */
467 /* rem_len == desired length for pbuf q */
470 /* (other types merely adjust their length fields */
472 /* reallocate and adjust the length of the pbuf that will be split */
476 /* adjust length fields for new last pbuf */
574 /* modify pbuf length fields */
754 /* add total length of second chain to all totals of first chain */
760 /* add total length of second chain to last pbuf total of first chain */
817 /* total length of pbuf p is its own length only */
912 * @param len length of data to copy (dataptr must be big enough). No more
961 * @param len length of the application supplied data buffer
1036 * @param len length of data to copy into the pbuf
1094 /** Compare pbuf contents at specified offset with memory s2, both of length n
1099 * @param n length of buffer to compare
1129 /** Find occurrence of mem (with length mem_len) in pbuf p, starting at offset
1132 * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as
1135 * @param mem_len length of 'mem'
1157 /** Find occurrence of substr with length substr_len in pbuf p, start at offset
1162 * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as
1164 * @param substr string to search for in p, maximum length is 0xFFFE