[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] TCP window / timer problem
From: |
Adam Fullerton |
Subject: |
[lwip-users] TCP window / timer problem |
Date: |
Tue, 08 Jun 2010 20:38:35 +0100 |
Hi,
I am having problems getting TCP/IP to work. Attached is a Wireshark
1.2.6 capture of a TCP connection that exhibits the problem.
With reference to the Wireshark capture:
The lwIP server device IP address is 192.168.243.2. The client
(192.168.243.4) makes a TCP connection. Frame 6 shows the client sending
the server the single character 0x0D. The lwIP server replies with the
data in frame 7 and the client acknowledges in frame 8. The client sends
the single character 0x0D again in frame 9. The server receives the data
and calls the lwip_write socket API but the data never reaches the
driver.
Below is the trace from lwIP TCP debug from frame 6. The
"+++++++++++++++++++++%p" and
"---------------------%p" trace is from the Ethernet
device driver when it references and frees the pbuf. When the data from
frame 9 is processed the driver is not called marked
##:
tcp_recved: recveived 1 bytes, wnd 2144 (0).
tcp_write(pcb=1c05f81c, data="" len=524, apiflags=1)
tcp_enqueue(pcb=1c05f81c, arg=3203c, len=524, flags=0, apiflags=1)
tcp_enqueue: queueing 6511:7035 (0x0)
tcp_output_segment: 6511:7035
+++++++++++++++++++++1c05faa4
>> pbuf processed
by driver
---------------------1c05faa4
<< pbuf freed by
driver
TCP header:
+-------------------------------+
| 1426
| 8023 | (src port,
dest port)
+-------------------------------+
|
2074141355 | (seq
no)
+-------------------------------+
|
0000007035 | (ack
no)
+-------------------------------+
| 5 | |010000|
65011 | (hdrlen, flags (ACK
), win)
+-------------------------------+
| 0xABD7
|
0 | (chksum, urgp)
+-------------------------------+
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: ACK for 7035, unacked->seqno 1863909376:1863909900
tcp_output: nothing to send (0)
State: ESTABLISHED
TCP header:
+-------------------------------+
| 1426
| 8023 | (src port,
dest port)
+-------------------------------+
|
2074141355 | (seq
no)
+-------------------------------+
|
0000007035 | (ack
no)
+-------------------------------+
| 5 | |011000|
65011 | (hdrlen, flags (PSH ACK
), win)
+-------------------------------+
| 0x9ECE
|
0 | (chksum, urgp)
+-------------------------------+
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags PSH ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_output: nothing to send (0)
State: ESTABLISHED
tcp_recved: recveived 1 bytes, wnd 2144 (0).
tcp_write(pcb=1c05f81c, data="" len=524, apiflags=1)
tcp_enqueue(pcb=1c05f81c, arg=3203c, len=524, flags=0, apiflags=1)
tcp_enqueue: queueing 7035:7559 (0x0)
## The driver is not
passed the pbuf
TCP header:
+-------------------------------+
| 1426
| 8023 | (src port,
dest port)
+-------------------------------+
|
2074141355 | (seq
no)
+-------------------------------+
|
0000007035 | (ack
no)
+-------------------------------+
| 5 | |011000|
65011 | (hdrlen, flags (PSH ACK
), win)
+-------------------------------+
| 0x9ECE
|
0 | (chksum, urgp)
+-------------------------------+
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags PSH ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: duplicate seqno 2074141355
tcp_output: sending ACK for 2074141356
+++++++++++++++++++++1c060174
>> The driver
sends frame 11
State: ESTABLISHED
---------------------1c060174
<< pbuf for frame
11 freed by driver
Does anyone know what I have done wrong in the configuration
/ timer implementation to prevent lwIP from sending the second TCP/IP
packet? The lwipopts.h file is attached.
Thanks,
Adam Fullerton.
TcpProblem.pcap
Description: Binary data
lwipopts.h
Description: Text document
- [lwip-users] TCP window / timer problem,
Adam Fullerton <=