Lines Matching refs:p_to
844 * @param p_to pbuf destination of the copy
848 * ERR_ARG if one of the pbufs is NULL or p_to is not big
852 pbuf_copy(struct pbuf *p_to, struct pbuf *p_from)
857 (void*)p_to, (void*)p_from));
860 LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) &&
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 */
871 /* current p_from does not fit into current p_to */
872 len = p_to->len - offset_to;
874 MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len);
877 LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
884 if (offset_to == p_to->len) {
885 /* on to next p_to (if any) */
887 p_to = p_to->next;
888 LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;);
896 if((p_to != NULL) && (p_to->len == p_to->tot_len)) {
899 (p_to->next == NULL), return ERR_VAL;);