486 |
} |
} |
487 |
|
|
488 |
/** |
/** |
489 |
* Tries to expand the payload with towards the front. |
* Adjusts the payload pointer +/- for header. |
490 |
* |
* |
491 |
* Adjusts the ->payload pointer so that space for a header appears in |
* Adjusts the ->payload pointer so that space for a header appears in |
492 |
* the pbuf. Also, the ->tot_len and ->len fields are adjusted. |
* the pbuf. Also, the ->tot_len and ->len fields are adjusted. |
493 |
* |
* |
494 |
* @param hdr_decrement Number of bytes to decrement header size. |
* @param hdr_size Number of bytes to increment header size which |
495 |
* (Using a negative value increases the header size.) |
* increases the size of the pbuf. New space is on the front. |
496 |
* |
* (Using a negative value decreases the header size.) |
497 |
|
* |
498 |
|
* PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so |
499 |
|
* the call will fail. A check is made that the increase in header size does |
500 |
|
* not move the payload pointer in front of the start of the buffer. |
501 |
* @return 1 on failure, 0 on success. |
* @return 1 on failure, 0 on success. |
502 |
*/ |
*/ |
503 |
u8_t |
u8_t |
714 |
/* add total length of second chain to all totals of first chain */ |
/* add total length of second chain to all totals of first chain */ |
715 |
p->tot_len += t->tot_len; |
p->tot_len += t->tot_len; |
716 |
} |
} |
717 |
|
/* add total length of second chain to last buffer tot_len in first chain */ |
718 |
|
p->tot_len += t->tot_len; |
719 |
|
|
720 |
/* chain last pbuf of h chain (p) with first of tail (t) */ |
/* chain last pbuf of h chain (p) with first of tail (t) */ |
721 |
p->next = t; |
p->next = t; |
722 |
/* t is now referenced to one more time */ |
/* t is now referenced to one more time */ |