lwip: Add LWIP_IPV6 macro to strip IPv6 function in LWIP component

This commit is contained in:
yuanjm
2021-01-18 19:13:22 +08:00
parent d8f2a57154
commit d80db218da
5 changed files with 42 additions and 8 deletions

View File

@@ -23,7 +23,11 @@
#include "lwip/memp.h"
#include "esp_log.h"
#if CONFIG_LWIP_IPV6
#define DBG_LWIP_IP_SHOW(info, ip) ESP_LWIP_LOGI("%s type=%d ip=%x", (info), (ip).type, (ip).u_addr.ip4.addr)
#else
#define DBG_LWIP_IP_SHOW(info, ip) ESP_LWIP_LOGI("%s type=%d ip=%x", (info), IPADDR_TYPE_V4, (ip).addr)
#endif
#define DBG_LWIP_IP_PCB_SHOW(pcb) \
DBG_LWIP_IP_SHOW("local ip", (pcb)->local_ip);\
DBG_LWIP_IP_SHOW("remote ip", (pcb)->local_ip);\

View File

@@ -749,7 +749,7 @@
/**
* LWIP_IPV6==1: Enable IPv6
*/
#define LWIP_IPV6 1
#define LWIP_IPV6 CONFIG_LWIP_IPV6
/**
* MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution.
@@ -962,7 +962,7 @@
#define ESP_AUTO_IP 1
#define ESP_PBUF 1
#define ESP_PPP 1
#define ESP_IPV6 1
#define ESP_IPV6 LWIP_IPV6
#define ESP_SOCKET 1
#define ESP_LWIP_SELECT 1
#define ESP_LWIP_LOCK 1