Eric Koldeweij wrote:
Normally RAW_PCB is the first one in the list and there should not be
anything before that. Do you have either LWIP_MALLOC_MEMPOOL or
LWIP_PBUF_MEMPOOL defined in your code?
No.
Do you use custom pools (MEMP_USE_CUSTOM_POOLS defined to
a nonzero value)? If so, please post your lwippools.h.
No I use '-DMEMP_MEM_MALLOC=1 -DMEM_LIBC_MALLOC=1'.
The code creating the enum is in src/include/lwip/memp.h and it takes
its items from src/include/lwip/priv/memp_std.h.
try using "gcc -E" to see what the include file expands like when
it's processed?
Here is the relevant pre-processed output of
'clang-cl -E':
typedef enum
{
# 1 ".//src/include/lwip/priv/memp_std.h" 1
# 42 ".//src/include/lwip/priv/memp_std.h"
MEMP_RAW_PCB,
MEMP_UDP_PCB,
MEMP_TCP_PCB,
MEMP_TCP_PCB_LISTEN,
MEMP_TCP_SEG,
MEMP_ALTCP_PCB,
MEMP_REASSDATA,
MEMP_FRAG_PBUF,
MEMP_NETBUF,
MEMP_NETCONN,
MEMP_TCPIP_MSG_API,
# 94 ".//src/include/lwip/priv/memp_std.h"
MEMP_ARP_QUEUE,
MEMP_IGMP_GROUP,
MEMP_SYS_TIMEOUT,
MEMP_NETDB,
MEMP_ND6_QUEUE,
MEMP_IP6_REASSDATA,
MEMP_MLD6_GROUP,
# 133 ".//src/include/lwip/priv/memp_std.h"
MEMP_PBUF,
MEMP_PBUF_POOL,
# 55 ".//src/include/lwip/memp.h" 2
MEMP_MAX
} memp_t;
---------
Looks OK to me; MEMP_RAW_PCB=0, but
'lwip_stats.memp[0] == NULL' even still. Even
after a lot of traffic was sent/received.
I wondered about your original statement:
Has any traffic already occurred?
Is it so that such a RAW_PCB pool is not initialised before traffic
occur? If so, the 'stats_display_memp()' fails to assume that.