lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] [lwip] TCP xfer stops


From: Atanas Korchev
Subject: [lwip-users] [lwip] TCP xfer stops
Date: Thu, 09 Jan 2003 01:34:09 -0000

I'm using lwip 0.5.3 multithreading. I'm trying to receive a 1.7 MB file 
using BSD sockets library function lwip_recv. Xfer is running fine but 
sometimes stops in the middle, waiting for more data to come but the 
sender application (win32 prog) claims that all data has been sent. I 
sniffed all communication using ethereal and realised that liwp was ACK-
ing one single segment four to five times! I ran out of ideas. Can anyone 
think out what's the big problem?

Here are some defines from  lwipopts.h :

#define MEM_ALIGNMENT           4

#define MEM_SIZE                640000

#define MEM_RECLAIM             1
#define MEMP_RECLAIM            1

#define MEMP_NUM_PBUF           1600 
#define MEMP_NUM_UDP_PCB        10
#define MEMP_NUM_TCP_PCB        10
#define MEMP_NUM_TCP_PCB_LISTEN 10
#define MEMP_NUM_TCP_SEG        160
#define MEMP_NUM_NETBUF         200 
#define MEMP_NUM_NETCONN        200 
#define MEMP_NUM_API_MSG        200
#define MEMP_NUM_TCPIP_MSG      200

#define MEMP_NUM_SYS_TIMEOUT    20

/* ---------- Pbuf options ---------- */

#define PBUF_POOL_SIZE          128
#define PBUF_POOL_BUFSIZE       512

#define PBUF_LINK_HLEN          16

/* ---------- TCP options ---------- */
#define TCP_TTL                 255

/* Controls if TCP should queue segments that arrive out of
   order. Define to 0 if your device is low on memory. */
#define TCP_QUEUE_OOSEQ         1

/* TCP Maximum segment size. */

#define TCP_MSS                 1460

/* TCP sender buffer space (bytes). */
#define TCP_SND_BUF             20480

/* TCP sender buffer space (pbufs). This must be at least = 2 *
   TCP_SND_BUF/TCP_MSS for things to work. */
#define TCP_SND_QUEUELEN        2 * TCP_SND_BUF/TCP_MSS

/* TCP receive window. */
#define TCP_WND                 20480

/* Maximum number of retransmissions of data segments. */
#define TCP_MAXRTX              12

/* Maximum number of retransmissions of SYN segments. */
#define TCP_SYNMAXRTX           4

/* ---------- ARP options ---------- */
#define ARP_TABLE_SIZE 10

/* ---------- IP options ---------- */
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
   IP packets across network interfaces. If you are going to run lwIP
   on a device with only one network interface, define this to 0. */
#define IP_FORWARD              0

/* If defined to 1, IP options are allowed (but not parsed). If
   defined to 0, all packets with IP options are dropped. */
#define IP_OPTIONS              1

/* ---------- ICMP options ---------- */
#define ICMP_TTL                255


/* ---------- UDP options ---------- */
#define UDP_TTL                 255


____________________________________________________
Êàêâî å ðåêëàìà â Èíòåðíåò? - http://reklama.mail.bg
[This message was sent through the lwip discussion list.]




reply via email to

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