lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Behavior of tcp_sent-callback


From: kbreining
Subject: [lwip-users] Behavior of tcp_sent-callback
Date: Sun, 8 Sep 2019 11:06:02 -0700 (MST)

I am currently porting matrixSSL 4.2.1 on a Cortex-M4 system using lwip
2.1.2, based on the callback-API.
To save RAM, I would like to use tcp_write with the option flag set to 0 (no
copy of data). To do this, I need to be informed by the lwIP-stack, if a
package has been sent out (which is not possible for what I know) or if the
peer has received it (using the tcp_sent-callback, which tells me the number
of bytes arrived).
However, the behavior of the tcp-stack on peer side depends on the browser
used. The example shows 2 different cases (using firefox). 
222120 is a message containing 2 tls records, but the same message also acks
frame 222119.
222131 is just an ack for frame 222130.

<http://lwip.100.n7.nabble.com/file/t2288/Wireshark_record.jpg> 

The problem is, that lwIP calls the tcp_sent-callback for the second case,
but not for the first one. For the first one, only the tcp_recv-callback is
called, which does not contain an info about the ack of the previous frame.
The code in tcp_in.c, function tcp_input is a little bit complicated to
understand in fast, but I can see that this part of the code, as well as the
code around the handling for the recv_acked variable has changed a lot
between lwIP 2.0.1 and 2.1.2 (but the behavior is the same). 

Is this behavior intended like that? Is it possible to change it by
configuration? Or is there any other way to get the same information from
the tcp_recv-callback?

Regards
Klaus



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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