lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Reassemble fragmented TCP packets


From: Alain Mouette
Subject: Re: [lwip-users] Reassemble fragmented TCP packets
Date: Thu, 27 Aug 2009 11:13:45 -0300
User-agent: Thunderbird 2.0.0.17 (X11/20080914)

My suggestion would be to get all packets as they come and put them in another buffer. Once the request is complete, send it to the httpd.

As to when it is complete, I am not sure if there are exceptions...

Alain

Baptiste Chaboud-crousaz escreveu:
Hi,

Thanks you very much for that clarifications. It is really helpful to understand where I should do something to fix my problem: the HTTP server.

Is there a way, by using another API than RAW API, to have TCP behaves as I expect? If yes which API should I use?

Regards.

Baptiste Chaboud-Crousaz

Quoting Mike Kleshov <address@hidden>:

 > 2009/8/27 Baptiste Chaboud-crousaz <address@hidden>:
>> Nevertheless, lwip is not able to reassemble the both frames. As a result,
 >> my HTTP server receive it separetely: first frame = the header; second
>> frame=the data. That 's not what it was expected!!!! I want lwip reassemble
 >> the both TCP segments before providing it the HTTP server.
 >
 > That's not how lwip is designed to work. If you are using the raw API,
 > lwip passes data to your application in chunks, as they arrive. Your
 > application is responsible for interpreting the data, however small or
 > large the chunks may be.
 > In fact, the simple HTTP server in contrib is cheating here: it
 > expects the HTTP request to be contained in a single pbuf, which is
 > true most of the time. However, it is perfectly legal to send an HTTP
 > request in many small packets (with 1-byte payload each, in an extreme
 > case) and the simple HTTP server provided will fail to process such
 > request correctly. You can realize such scenario using a telnet client
 > to send an HTTP request: the telnet client sends data 1 byte at a time
 > as you type it.
 >
 > Regards,
 > - mike
 >
 >
 > _______________________________________________
 > lwip-users mailing list
 > address@hidden
 > http://lists.nongnu.org/mailman/listinfo/lwip-users
 >


------------------------------------------------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

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