]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/blobdiff - src/include/arch/lwipopts.h
lwip: Update configuration
[pes-rpp/rpp-lwip.git] / src / include / arch / lwipopts.h
index 3261a9cc2e9c5884930a49304909c6517877cc56..cfd627d456949c7705a4ca7c8c87b9238905c849 100644 (file)
 /*****************************************************************************
 **                    Platform specific locking
 *****************************************************************************/
-#define SYS_LIGHTWEIGHT_PROT            1 /* critical sections */
+#define SYS_LIGHTWEIGHT_PROT            1 /* critical sections lightweight
+                                          * synchronisation primitives
+                                          */
 #define NO_SYS                          0
 
 /*****************************************************************************
 **                    TCPIP thread - used when NO_SYS defined to 0
 *****************************************************************************/
 #define TCPIP_THREAD_PRIO               0
-#define TCPIP_THREAD_STACKSIZE          1000
+#define TCPIP_THREAD_STACKSIZE          600
 
 /*****************************************************************************
 **                          Memory Options
 *****************************************************************************/
+//#define MEM_USE_POOLS                   1
 #define MEM_ALIGNMENT                   4 /* dflt 1 */
-#define MEM_SIZE                        (30 * 1024) /* 30K */ /* dflt 1600 */
+#define MEM_SIZE                        (64 * 1024) /* dflt 1600 */
 #define MEMP_NUM_PBUF                   48 /* dflt 16 */
 #define MEMP_NUM_TCP_PCB                16 /* dflt 5 */
-#define PBUF_POOL_SIZE                  96 /* dflt 16 */
+#define PBUF_POOL_SIZE                  128 /* dflt 16 */
 
 /*****************************************************************************
 **                           IP Options
 /*****************************************************************************
 **                           TCP  Options
 *****************************************************************************/
-#define TCP_WND                         4096   /* default is 2048 */
-#define TCP_MSS                         1500        /* default is 128 */
+#define TCP_MSS                         512        /* default is 128 */ /* Maximum Segment Size */
+#define TCP_WND                         (TCP_MSS * 4)   /* default is 2048 */ /* Window size */
 #define TCP_SND_BUF                     (4 * TCP_MSS)
 
 /*****************************************************************************
                                            /* default is LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)*/
 #define ETH_PAD_SIZE                    0
 #define MEMP_NUM_NETCONN                10
-#define LWIP_NETCONN                    1          /*default is 1*/
+#define LWIP_NETCONN                    !NO_SYS & 1 /*default is 1 - can be used only when NO_SYS = 0*/
 
 /*****************************************************************************
 **                           Socket  Options
 
 #define LWIP_SO_RCVTIMEO                1           /* enable receive timeout; default is 0 */
 
-/*****************************************************************************
-**                          Debugging options
-*****************************************************************************/
-#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_OFF
-#define LWIP_DBG_TYPES_ON               (LWIP_DBG_ON | LWIP_DBG_TRACE \
-                                         |LWIP_DBG_STATE | LWIP_DBG_FRESH)
-
 /*****************************************************************************
 **                          Mbox options
 *****************************************************************************/
-#define TCPIP_MBOX_SIZE                 10
+#define TCPIP_MBOX_SIZE                 20
 #define DEFAULT_RAW_RECVMBOX_SIZE       10
 #define DEFAULT_UDP_RECVMBOX_SIZE       10
 #define DEFAULT_TCP_RECVMBOX_SIZE       10
 #define DEFAULT_ACCEPTMBOX_SIZE         10
 
+/*****************************************************************************
+**                          Statistics options
+*****************************************************************************/
+#define LWIP_STATS_DISPLAY              1
+
+/*****************************************************************************
+**                          Debugging options
+*****************************************************************************/
+#define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_ALL
+#define LWIP_DBG_TYPES_ON               (LWIP_DBG_ON | LWIP_DBG_TRACE \
+                                         |LWIP_DBG_STATE | LWIP_DBG_FRESH)
+
+#define ALL_DBG_ON                      0
+#define ALL_DBG_OFF                     0 /* higher priority than ALL_DBG_ON */
+
+#ifdef LWIP_DEBUG
+#if !ALL_DBG_OFF
+
+/**
+ * ETHARP_DEBUG: Enable debugging in etharp.c.
+ */
+#define ETHARP_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * NETIF_DEBUG: Enable debugging in netif.c.
+ */
+#define NETIF_DEBUG                     LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * PBUF_DEBUG: Enable debugging in pbuf.c.
+ */
+#define PBUF_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * API_LIB_DEBUG: Enable debugging in api_lib.c.
+ */
+#define API_LIB_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * API_MSG_DEBUG: Enable debugging in api_msg.c.
+ */
+#define API_MSG_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * SOCKETS_DEBUG: Enable debugging in sockets.c.
+ */
+#define SOCKETS_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * ICMP_DEBUG: Enable debugging in icmp.c.
+ */
+#define ICMP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * IGMP_DEBUG: Enable debugging in igmp.c.
+ */
+#define IGMP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * INET_DEBUG: Enable debugging in inet.c.
+ */
+#define INET_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * IP_DEBUG: Enable debugging for IP.
+ */
+#define IP_DEBUG                        LWIP_DBG_ON | ALL_DBG_ON
+
+/**
+ * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
+ */
+#define IP_REASS_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * RAW_DEBUG: Enable debugging in raw.c.
+ */
+#define RAW_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * MEM_DEBUG: Enable debugging in mem.c.
+ */
+#define MEM_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * MEMP_DEBUG: Enable debugging in memp.c.
+ */
+#define MEMP_DEBUG                      LWIP_DBG_ON | ALL_DBG_ON
+
+/**
+ * SYS_DEBUG: Enable debugging in sys.c.
+ */
+#define SYS_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TIMERS_DEBUG: Enable debugging in timers.c.
+ */
+#define TIMERS_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TCP_DEBUG: Enable debugging for TCP.
+ */
+#define TCP_DEBUG                       LWIP_DBG_ON | ALL_DBG_ON
+
+/**
+ * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
+ */
+#define TCP_INPUT_DEBUG                 LWIP_DBG_ON | ALL_DBG_ON
+
+/**
+ * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
+ */
+#define TCP_FR_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
+ * timeout.
+ */
+#define TCP_RTO_DEBUG                   LWIP_DBG_ON | ALL_DBG_ON
+
+/**
+ * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
+ */
+#define TCP_CWND_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
+ */
+#define TCP_WND_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
+ */
+#define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
+ */
+#define TCP_RST_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
+ */
+#define TCP_QLEN_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * UDP_DEBUG: Enable debugging in UDP.
+ */
+#define UDP_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * TCPIP_DEBUG: Enable debugging in tcpip.c.
+ */
+#define TCPIP_DEBUG                     LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * PPP_DEBUG: Enable debugging for PPP.
+ */
+#define PPP_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * SLIP_DEBUG: Enable debugging in slipif.c.
+ */
+#define SLIP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * DHCP_DEBUG: Enable debugging in dhcp.c.
+ */
+#define DHCP_DEBUG                      LWIP_DBG_ON | ALL_DBG_ON
+
+/**
+ * AUTOIP_DEBUG: Enable debugging in autoip.c.
+ */
+#define AUTOIP_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
+ */
+#define SNMP_MSG_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
+ */
+#define SNMP_MIB_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * DNS_DEBUG: Enable debugging for DNS.
+ */
+#define DNS_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
+
+/**
+ * IP6_DEBUG: Enable debugging for IPv6.
+ */
+#define IP6_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
+
+#endif /* !ALL_DBG_OFF */
+#endif /* LWIP_DEBUG */
 
 #endif /* __LWIPOPTS_H__ */