|
From: | N.Karakotas |
Subject: | Re: [lwip-users] netconn_recv partial data |
Date: | Sat, 21 Jan 2012 00:35:43 +0200 |
Hi,
Here is the debug output. Is data coming in faster than im
processing?
netif_set_ipaddr: netif address being changed
netif: IP address of interface 192.168.5.16
netif: netmask of interface 255.255.255.0
netif: GW address of interface 192.168.5.1
netif: added interface em IP addr 192.168.5.16 netmask 255.255.255.0 gw
192.168.5.1
tcpip_thread: PACKET 0x10001530
tcpip_thread: PACKET 0x100014f0
tcpip_thread: PACKET 0x10001530
ip_input: iphdr->dest 0x1005a8c0 netif->ip_addr 0x1005a8c0 (0x5a8c0,
0x5a8c0, 0x10000000)
ip_input: packet not for us.
ip_route: No route to 192.168.5.16
ip_forward: no forwarding route for 192.168.5.16 found
tcpip_thread: PACKET 0x100014f0
netif: setting default interface em
tcpip_thread: PACKET 0x100014f0
tcpip_thread: PACKET 0x10001530
tcpip_thread: PACKET 0x100014b0
tcpip_thread: PACKET 0x100014f0
tcpip_thread: API message 0x1000410c
tcpip_thread: PACKET 0x100014f0
tcpip_thread: API message 0x1000410c
tcp_bind: bind to port 8080
tcpip_thread: API message 0x1000410c
tcpip_thread: PACKET 0x100014f0
tcpip_thread: API message 0x100040dc
netif_find: found em
tcpip_thread: API message 0x10004094
tcp_bind: bind to port 49153
tcpip_thread: API message 0x10004094
tcp_connect to port 80
inet_chksum_pseudo(): checksumming pbuf 0x10005b58 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=a7d7
ip_output_if: em0
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
44 | (v, hl, tos, len)
+-------------------------------+
| 0
|000| 0 | (id, flags,
offset)
+-------------------------------+
| 255 | 6 |
0x3008 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 16 | (src)
+-------------------------------+
| 192 | 168 | 5
| 99 | (dest)
+-------------------------------+
netif->output()tcpip_thread: PACKET 0x100014f0
tcpip_thread: PACKET 0x100014b0
tcpip_thread: PACKET 0x10001530
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x10001430
ip_input: iphdr->dest 0x1005a8c0 netif->ip_addr 0x1005a8c0 (0x5a8c0,
0x5a8c0, 0x10000000)
ip_input: packet accepted on interface em
ip_input:
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
40 | (v, hl, tos, len)
+-------------------------------+
| 37013
|010| 0 | (id, flags,
offset)
+-------------------------------+
| 64 | 6 |
0x1e77 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 99 | (src)
+-------------------------------+
| 192 | 168 | 5
| 16 | (dest)
+-------------------------------+
ip_input: p->len 40 p->tot_len 40
TCP header:
+-------------------------------+
| 80
| 49153 | (src port, dest
port)
+-------------------------------+
|
2333605984 | (seq
no)
+-------------------------------+
|
0000006624 | (ack
no)
+-------------------------------+
| 5 | |010000|
5840 | (hdrlen, flags (ACK
), win)
+-------------------------------+
| 0xa796
| 0 |
(chksum, urgp)
+-------------------------------+
inet_chksum_pseudo(): checksumming pbuf 0x100026a8 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=ffff
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: SYN_SENT
SYN-SENT: ackno 6624 pcb->snd_nxt 6510 unacked 6509
inet_chksum_pseudo(): checksumming pbuf 0x10005bac (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=9d49
ip_output_if: em0
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
40 | (v, hl, tos, len)
+-------------------------------+
| 1
|000| 0 | (id, flags,
offset)
+-------------------------------+
| 255 | 6 |
0x300b | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 16 | (src)
+-------------------------------+
| 192 | 168 | 5
| 99 | (dest)
+-------------------------------+
netif->output()State: SYN_SENT
tcpip_thread: PACKET 0x100014f0
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x10001530
tcpip_thread: PACKET 0x100014b0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013b0
tcpip_thread: PACKET 0x10001370
tcpip_thread: PACKET 0x10001430
tcpip_thread: PACKET 0x10001530
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcp_slowtmr: processing active pcb
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x100013f0
tcp_slowtmr: processing active pcb
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x10001470
tcp_slowtmr: processing active pcb
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x100013f0
tcp_slowtmr: processing active pcb
tcp_slowtmr: polling application
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcp_slowtmr: processing active pcb
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001470
tcp_slowtmr: processing active pcb
inet_chksum_pseudo(): checksumming pbuf 0x10005b58 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=a7d7
ip_output_if: em0
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
44 | (v, hl, tos, len)
+-------------------------------+
| 2
|000| 0 | (id, flags,
offset)
+-------------------------------+
| 255 | 6 |
0x3006 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 16 | (src)
+-------------------------------+
| 192 | 168 | 5
| 99 | (dest)
+-------------------------------+
netif->output()tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001530
tcpip_thread: PACKET 0x10001430
tcpip_thread: PACKET 0x10001370
ip_input: iphdr->dest 0x1005a8c0 netif->ip_addr 0x1005a8c0 (0x5a8c0,
0x5a8c0, 0x10000000)
ip_input: packet accepted on interface em
ip_input:
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
44 | (v, hl, tos, len)
+-------------------------------+
| 0
|010| 0 | (id, flags,
offset)
+-------------------------------+
| 64 | 6 |
0xaf08 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 99 | (src)
+-------------------------------+
| 192 | 168 | 5
| 16 | (dest)
+-------------------------------+
ip_input: p->len 44 p->tot_len 44
TCP header:
+-------------------------------+
| 80
| 49153 | (src port, dest
port)
+-------------------------------+
|
2823389896 | (seq
no)
+-------------------------------+
|
0000006510 | (ack
no)
+-------------------------------+
| 6 | |010010|
5840 | (hdrlen, flags (SYN ACK
), win)
+-------------------------------+
| 0xf0b0
| 0 |
(chksum, urgp)
+-------------------------------+
inet_chksum_pseudo(): checksumming pbuf 0x10001f94 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=ffff
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags SYN ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: SYN_SENT
tcp_parseopt: MSS
SYN-SENT: ackno 6510 pcb->snd_nxt 6510 unacked 6509
inet_chksum_pseudo(): checksumming pbuf 0x10005b58 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=c1e8
ip_output_if: em0
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
40 | (v, hl, tos, len)
+-------------------------------+
| 3
|000| 0 | (id, flags,
offset)
+-------------------------------+
| 255 | 6 |
0x3009 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 16 | (src)
+-------------------------------+
| 192 | 168 | 5
| 99 | (dest)
+-------------------------------+
netif->output()State: ESTABLISHED
tcpip_thread: PACKET 0x10001530
tcpip_thread: PACKET 0x10001430
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001470
tcpip_thread: PACKET 0x100013b0
tcpip_thread: PACKET 0x100014b0
tcpip_thread: PACKET 0x100014f0
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001430
tcpip_thread: PACKET 0x100014b0
tcpip_thread: API message 0x10004094
inet_chksum_pseudo(): checksumming pbuf 0x10005b58 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=c232
ip_output_if: em0
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
154 | (v, hl, tos, len)
+-------------------------------+
| 4
|000| 0 | (id, flags,
offset)
+-------------------------------+
| 255 | 6 |
0x2f96 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 16 | (src)
+-------------------------------+
| 192 | 168 | 5
| 99 | (dest)
+-------------------------------+
netif->output()tcpip_thread: PACKET 0x100014b0
tcpip_thread: PACKET 0x10001430
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x100014f0
ip_input: iphdr->dest 0x1005a8c0 netif->ip_addr 0x1005a8c0 (0x5a8c0,
0x5a8c0, 0x10000000)
ip_input: packet accepted on interface em
ip_input:
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
40 | (v, hl, tos, len)
+-------------------------------+
| 39996
|010| 0 | (id, flags,
offset)
+-------------------------------+
| 64 | 6 |
0x12d0 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 99 | (src)
+-------------------------------+
| 192 | 168 | 5
| 16 | (dest)
+-------------------------------+
ip_input: p->len 40 p->tot_len 40
TCP header:
+-------------------------------+
| 80
| 49153 | (src port, dest
port)
+-------------------------------+
|
2823389897 | (seq
no)
+-------------------------------+
|
0000006624 | (ack
no)
+-------------------------------+
| 5 | |010000|
5840 | (hdrlen, flags (ACK
), win)
+-------------------------------+
| 0x07fc
| 0 |
(chksum, urgp)
+-------------------------------+
inet_chksum_pseudo(): checksumming pbuf 0x10002dbc (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=ffff
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
tcp_receive: ACK for 6624, unacked->seqno 6510:6624
tcp_receive: removing 6510:6624 from pcb->unacked
State: ESTABLISHED
tcpip_thread: PACKET 0x100013b0
ip_input: iphdr->dest 0x1005a8c0 netif->ip_addr 0x1005a8c0 (0x5a8c0,
0x5a8c0, 0x10000000)
ip_input: packet accepted on interface em
ip_input:
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
305 | (v, hl, tos, len)
+-------------------------------+
| 39997
|010| 0 | (id, flags,
offset)
+-------------------------------+
| 64 | 6 |
0x11c6 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 99 | (src)
+-------------------------------+
| 192 | 168 | 5
| 16 | (dest)
+-------------------------------+
ip_input: p->len 305 p->tot_len 305
TCP header:
+-------------------------------+
| 80
| 49153 | (src port, dest
port)
+-------------------------------+
|
2823389897 | (seq
no)
+-------------------------------+
|
0000006624 | (ack
no)
+-------------------------------+
| 5 | |011000|
5840 | (hdrlen, flags (PSH ACK
), win)
+-------------------------------+
| 0x1534
| 0 |
(chksum, urgp)
+-------------------------------+
inet_chksum_pseudo(): checksumming pbuf 0x100021f0 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=ffff
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags PSH ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: ESTABLISHED
State: ESTABLISHED
tcpip_thread: PACKET 0x10001470
ip_input: iphdr->dest 0x1005a8c0 netif->ip_addr 0x1005a8c0 (0x5a8c0,
0x5a8c0, 0x10000000)
ip_input: packet accepted on interface em
ip_input:
IP header:
+-------------------------------+
| 4 | 5 | 0x00 |
1064 | (v, hl, tos, len)
+-------------------------------+
| 39998
|010| 0 | (id, flags,
offset)
+-------------------------------+
| 64 | 6 |
0x0ece | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 5
| 99 | (src)
+-------------------------------+
| 192 | 168 | 5
| 16 | (dest)
+-------------------------------+
ip_input: p->len 498 p->tot_len 1064
TCP header:
+-------------------------------+
| 80
| 49153 | (src port, dest
port)
+-------------------------------+
|
2823390162 | (seq
no)
+-------------------------------+
|
0000006624 | (ack
no)
+-------------------------------+
| 5 | |010000|
5840 | (hdrlen, flags (ACK
), win)
+-------------------------------+
| 0x693c
| 0 |
(chksum, urgp)
+-------------------------------+
inet_chksum_pseudo(): checksumming pbuf 0x10003018 (has next 0x10002904)
inet_chksum_pseudo(): checksumming pbuf 0x10002904 (has next 0x10001f94)
inet_chksum_pseudo(): checksumming pbuf 0x10001f94 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=4cc
inet_chksum_pseudo(): checksumming pbuf 0x10003018 (has next 0x10002904)
inet_chksum_pseudo(): checksumming pbuf 0x10002904 (has next 0x10001f94)
inet_chksum_pseudo(): checksumming pbuf 0x10001f94 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=4cc
tcp_input: packet discarded due to failing checksum 0xfb33
TCP header:
+-------------------------------+
| 80
| 49153 | (src port, dest
port)
+-------------------------------+
|
2823390162 | (seq
no)
+-------------------------------+
|
0000006624 | (ack
no)
+-------------------------------+
| 5 | |010000|
5840 | (hdrlen, flags (ACK
), win)
+-------------------------------+
| 0x693c
| 0 |
(chksum, urgp)
+-------------------------------+
tcpip_thread: PACKET 0x100013f0
tcpip_thread: PACKET 0x10001430
tcpip_thread: PACKET 0x100014b0
tcpip_thread: PACKET 0x100014f0
tcpip_thread: API message 0x100040b4
tcp_recved: recveived 265 bytes, wnd 2048 (0).
From: N.Karakotas
Sent: Saturday, January 21, 2012 12:00 AM
To: address@hidden
Subject: Re: [lwip-users] netconn_recv partial
data Hi,
The following code gets stuck on the second netconn_recv.
resp = netconn_recv(conn,&inbuf) ;
netbuf_data(inbuf, (void*)&data, &buflen);
printf("%d\r\n",resp);
// netbuf_next(inbuf);
resp = netconn_recv(conn,&inbuf) ;
netbuf_data(inbuf, (void*)&data, &buflen);
Nick
_______________________________________________ lwip-users mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/lwip-users |
[Prev in Thread] | Current Thread | [Next in Thread] |