When I create the 4th connect, All the others connects will be quit,
and the new connect are not avaliable.

Are there some other setup?

There are my lwipopts.h file.
/*
 * Copyright (c) 2001, 2002 Swedish Institute of Computer Science.
 * All rights reserved. 
 * 
 * Redistribution and use in source and binary forms, with or without 
modification, 
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission. 
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 
EVENT 
 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
PROCUREMENT 
 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING 
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
POSSIBILITY 
 * OF SUCH DAMAGE.
 *
 * This file is part of the lwIP TCP/IP stack.
 * 
 * Author: Adam Dunkels <[EMAIL PROTECTED]>
 *
 */

#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__

#if 1
#define LWIP_DEBUG
#define DBG_MIN_LEVEL   0
#define DBG_TYPES_ON    (DBG_ON | DBG_TRACE | DBG_STATE | DBG_FRESH | DBG_HALT)
#if 0
#define TCP_DEBUG       DBG_OFF
#define TCP_QLEN_DEBUG  DBG_OFF
#define TCP_OUTPUT_DEBUG        DBG_ON
#define TCP_RTO_DEBUG   DBG_ON
#define TCP_FR_DEBUG    DBG_ON
#define TCP_CWND_DEBUG                  DBG_ON
#define TCP_WND_DEBUG                   DBG_ON
#endif
#define TCP_RST_DEBUG                   DBG_ON
#if 1
#define LINK_STATS  1
#define IP_STATS    1
#define IPFRAG_STATS    1
#define ICMP_STATS  1
#define UDP_STATS   1
#define TCP_STATS   1
#define MEM_STATS   1
#define MEMP_STATS  1
#define PBUF_STATS  1
#define SYS_STATS   1
#define RAW_STATS   1
#define LWIP_STATS_DISPLAY  1
#endif
#define MEM_DEBUG       DBG_ON
#define MEMP_DEBUG      DBG_ON
#if 0
#define TCP_INPUT_DEBUG DBG_ON
#define RAW_DEBUG       DBG_OFF
#define PBUF_DEBUG      DBG_OFF
#endif
#endif

//efine SO_REUSE        1
#define NO_SYS                  0
#define LWIP_CALLBACK_API       1
#define LWIP_DHCP               0
#define SYS_LIGHTWEIGHT_PROT            1

/* #define TCP_TMR_INTERVAL     250 */
#define TCP_TMR_INTERVAL        250

/* ---------- Memory options ---------- */
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
   lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
   byte alignment -> define MEM_ALIGNMENT to 2. */
/* tried 4 byte alignment, but that seems to cause problems with pbuf
 * routines */
#define MEM_ALIGNMENT           4

/* MEM_SIZE: the size of the heap memory. If the application will send
a lot of data that needs to be copied, this should be set high. */
#define MEM_SIZE                1024*90

/* The following four are used only with the sequential API and can be
   set to 0 if the application only will use the raw API. */
/* MEMP_NUM_NETBUF: the number of struct netbufs. */
#define MEMP_NUM_NETBUF         2
/* MEMP_NUM_NETCONN: the number of struct netconns. */
#define MEMP_NUM_NETCONN        4*2
#define MEMP_NUM_TCP_PCB                5*10
#define OS_MAX_QS                20*2    /* Max. number of queue control blocks 
in your application      */
/* MEMP_NUM_APIMSG: the number of struct api_msg, used for
   communication between the TCP/IP stack and the sequential
   programs. */
#define MEMP_NUM_API_MSG        16
/* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
   for sequential API communication and incoming packets. Used in
   src/api/tcpip.c. */
#define MEMP_NUM_TCPIP_MSG      16*10

#define MEMP_NUM_SYS_TIMEOUT            4+1

#define PBUF_POOL_SIZE          16*16
#define PBUF_POOL_BUFSIZE       128
#define PBUF_LINK_HLEN          14

#define TCP_MSS                 1460

/* TCP_SND_BUF should be less than or equal to MEMP_NUM_TCP_SEG *
 * TCP_MSS otherwise the system will not be able to allocate enough
 * tcp_segs to transmit all the data and will return ERR_MEM when
 * attempting to transmit large amounts of data.  You want to guarantee
 * that there are more tcp_segs than there is memory.  Each segment
 * is equal to TCP_MSS.
 */
#define MEMP_NUM_TCP_SEG        255

#define TCP_WND                 2048
#define TCP_SND_BUF             (MEMP_NUM_TCP_SEG-1) * TCP_MSS

#endif /* __LWIPOPTS_H__ */
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to