All you need is in the other apps, and the RFCs (for the telnet protocol...)
Once you get a pbuf, you basically get the data by reading each pbuf in
the chain, though there is a function to do that.
The easy way:
pbuf_copy_partial(p, buffer, p->tot_len, 0);
The hard, instructional way:
struct pbuf *q = p;
int offset=0;
while(q){
memcpy(&buffer[offset],p->payload,p->len);
offset += p->len;
q = q->next;
}
Both "ways" put your data into your buffer, so you can do with that
whatever you please.
If you check the webserver, it even teaches you how to work with it
piece by piece.
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users