Why don't you use pbuf_cat()? This uses the next pointer of the last pbuf in a chain.

Simon

On 15.02.2018 18:55, Michael Steinberg wrote:
Hey,

right, it was silly to even ask really ;)
Would I cause considerable harm to the RAM-pool if I allocated the
necessary storage for queueing (basically a linked list node) from it
with a RAW allocation? The packet and node pbufs would be deallocated
together again later-on. The alternative would be to define a limit of
packets to queue up, since space is at premium and I can't add another
heap allocator... Maybe I'm just not seeing the easy solution today ;)

Kind regards
Michael


Am 15.02.2018 um 13:04 schrieb Simon Goldschmidt:
Steinberg Michael wrote:
I need to queue up received UDP packets inside the UDP receive callback (RAW 
API) for
an event driven->polling transfer. I take that the passed in pbuf pointers may 
very
well point to pbuf chains, right?
Yes.

Abusing the pbuf next pointers for my own custom packet queue seemed like a 
quick answer,
but I fear that it might backfire quickly...
Not a good idea.

Simon

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to