lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] design choice: pbufs in applications?


From: Leon Woestenberg
Subject: [lwip-users] [lwip] design choice: pbufs in applications?
Date: Thu, 09 Jan 2003 01:07:37 -0000

Hello everyone,

I'm wondering how you guys and gals implement your
typical application for lwIP. Apps have to deal with the
pbuf's being offered by lwIP, which are typically
small chained PBUF_POOL pbufs (from the Ethernet
driver).

A simple, but memory hungry approach, is to copy the
pbuf chains into a sequential memory aread, dynamically,
allocated and free each pbuf doing so. After that, your
application can be kept simple, parsing through that
memory.

A complex, less memory hungry, but more code hungry
approach is to have your application deal with the pbuf
chain. In this case, EACH access to a value or struct
within the packets has to check whether a pbuf boundary
is crossed.

For DHCP, I have chosen the latter approach, hoping to
re-use the functions that extract data from the pbuf chain.

Regards, Leon.


[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]