lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] Re: [patch #6537] wnd_scale TCP option addition


From: Wim Dumon
Subject: [lwip-devel] Re: [patch #6537] wnd_scale TCP option addition
Date: Mon, 20 Apr 2009 15:02:10 +0200

On Mon, Apr 20, 2009 at 12:34 PM, Simon Goldschmidt <address@hidden> wrote:
>> I started doing it that way, but felt that I would end up adding a lot
>> of complexity for no good reason. pbuf is already a chained structure,
>> and chaining these chains again would need extra allocated structures
>> & logic. I'm not too familiar with lwip, maybe there is another
>> list-like structures that I could use?
>
> lwIP allows 2 kinds of pbuf-lists (see top of pbuf.c for a more detailed 
> description):
> - single packet: last pbuf has next == NULL and len == tot_len
> - multiple packets: packets ends where len == tot_len, last pbuf of last 
> packet has next == NULL
>
> The stack already relies on this in other places, so it can be used here, too.
>

The comments in pbuf.c state:
 * So, a packet queue consists of one or more pbuf chains, each of
 * which consist of one or more pbufs. CURRENTLY, PACKET QUEUES ARE
 * NOT SUPPORTED!!! Use helper structs to queue multiple packets.

I also couldn't find functions to manipulate packet queues (pbuf_cat,
pbuf_chain, pbuf_dechain do not seem to handle packet queues), so I
assumed that this was not (yet) intended usage. I didn't want to do
this 'helper struct' thing because of reasons explained in my previous
mail (complexity).

I think I can solve it with packet queues too, leaving the tot_len a
16 bit counter. Would that be more acceptable?

Best regards,
Wim.




reply via email to

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