Lines Matching refs:p_from
845 * @param p_from pbuf source of the copy
849 * enough to hold p_from
852 pbuf_copy(struct pbuf *p_to, struct pbuf *p_from)
857 (void*)p_to, (void*)p_from));
861 (p_from != NULL) && (p_to->tot_len >= p_from->tot_len)), return ERR_ARG;);
867 if ((p_to->len - offset_to) >= (p_from->len - offset_from)) {
868 /* complete current p_from fits into current p_to */
869 len = p_from->len - offset_from;
871 /* current p_from does not fit into current p_to */
874 MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len);
878 LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
879 if (offset_from >= p_from->len) {
880 /* on to next p_from (if any) */
882 p_from = p_from->next;
888 LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;);
891 if((p_from != NULL) && (p_from->len == p_from->tot_len)) {
894 (p_from->next == NULL), return ERR_VAL;);
901 } while (p_from);