Further improvements to selftest, lwIP driver updates

This commit is contained in:
Joseph Henry
2017-09-06 18:02:30 -07:00
parent 142c27091c
commit e18c1ccf80
11 changed files with 250 additions and 99 deletions

View File

@@ -65,18 +65,6 @@
#define ZT_FILENAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) // short
/*
#ifdef __linux__
#define ZT_THREAD_ID 0 // (long)getpid()
#elif __FreeBSD__
#define ZT_THREAD_ID 0 // (long)getpid()
#elif __APPLE__
#define ZT_THREAD_ID 0 // (long)syscall(SYS_thread_selfid)
#endif
*/
// #define ZT_THREAD_ID 0
#if defined(__JNI_LIB__)
#include <jni.h>
#endif
@@ -85,6 +73,9 @@
#define ZT_LOG_TAG "ZTSDK"
#endif
#define DEBUG_LWIP(fmt, args...) fprintf(stderr, ZT_CYN "LWIP : %17s:%5d:%25s: " fmt \
ZT_RESET, ZT_FILENAME, __LINE__, __FUNCTION__, ##args)
#if ZT_DEBUG_LEVEL >= ZT_MSG_TEST
#define DEBUG_TEST(fmt, args...) fprintf(stderr, ZT_CYN "TEST : %17s:%5d:%25s: " fmt \
"\n" ZT_RESET, ZT_FILENAME, __LINE__, __FUNCTION__, ##args)

View File

@@ -54,13 +54,68 @@
#define LWIP_IPV6 0
#endif
#define LWIP_TCP 1
#define IP6_DEBUG 1
#define LWIP_DEBUG 1
#define IP_DEBUG LWIP_DBG_ON
#define LWIP_ETHERNET 1
// --- DEBUG ---
#define LWIP_DBG_TYPES_ON LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_FRESH
/* flag for LWIP_DEBUGF indicating a tracing message
* (to follow program flow)
*/
#define LWIP_DBG_TRACE 0x40U
/* flag for LWIP_DEBUGF indicating a state debug message
* (to follow module states)
*/
#define LWIP_DBG_STATE 0x20U
/* flag for LWIP_DEBUGF indicating newly added code,
* not thoroughly tested yet
*/
#define LWIP_DBG_FRESH 0x10U
/* flag for LWIP_DEBUGF to halt after printing
* this debug message
*/
#define LWIP_DBG_HALT 0x08U
#define LWIP_DEBUG 0
//#define LWIP_DBG_TYPES_ON LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_FRESH
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define ETHARP_DEBUG LWIP_DBG_OFF
#define NETIF_DEBUG LWIP_DBG_OFF
#define PBUF_DEBUG LWIP_DBG_OFF
#define API_LIB_DEBUG LWIP_DBG_OFF
#define API_MSG_DEBUG LWIP_DBG_OFF
#define SOCKETS_DEBUG LWIP_DBG_OFF
#define ICMP_DEBUG LWIP_DBG_OFF
#define IGMP_DEBUG LWIP_DBG_OFF
#define INET_DEBUG LWIP_DBG_OFF
#define IP_DEBUG LWIP_DBG_OFF
#define IP_REASS_DEBUG LWIP_DBG_OFF
#define RAW_DEBUG LWIP_DBG_OFF
#define MEM_DEBUG LWIP_DBG_OFF
#define MEMP_DEBUG LWIP_DBG_OFF
#define SYS_DEBUG LWIP_DBG_OFF
#define TIMERS_DEBUG LWIP_DBG_OFF
#define TCP_DEBUG LWIP_DBG_OFF
#define TCP_INPUT_DEBUG LWIP_DBG_OFF
#define TCP_FR_DEBUG LWIP_DBG_OFF
#define TCP_RTO_DEBUG LWIP_DBG_OFF
#define TCP_CWND_DEBUG LWIP_DBG_OFF
#define TCP_WND_DEBUG LWIP_DBG_OFF
#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
#define TCP_RST_DEBUG LWIP_DBG_OFF
#define TCP_QLEN_DEBUG LWIP_DBG_OFF
#define UDP_DEBUG LWIP_DBG_OFF
#define TCPIP_DEBUG LWIP_DBG_OFF
#define SLIP_DEBUG LWIP_DBG_OFF
#define DHCP_DEBUG LWIP_DBG_OFF
#define AUTOIP_DEBUG LWIP_DBG_OFF
#define DNS_DEBUG LWIP_DBG_OFF
#define IP6_DEBUG LWIP_DBG_OFF
#define LWIP_UDP 1
#define LWIP_TCP 1
#define LWIP_ETHERNET 1
#define LWIP_CHKSUM_ALGORITHM 2