You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2026/10/21 17:54:46 UTC
(mynewt-core) 04/15: net/ip/lwip_mn: Make number of UDP PCBs configurable
This is an automated email from the ASF dual-hosted git repository.
kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 3b540b6729fc65162414229d98a7728f09197f80
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Oct 13 12:34:35 2026 +0200
net/ip/lwip_mn: Make number of UDP PCBs configurable
MEMP_NUM_UDP_PCB was fixed at 4. An application using DHCP client,
inet_def_service (3 UDP sockets) and a DHCP server on a second
interface needs more. Add LWIP_NUM_UDP_PCB syscfg with the old
value as default.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
net/ip/lwip_mn/lwipopts/include/lwipopts.h | 2 +-
net/ip/lwip_mn/lwipopts/syscfg.yml | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/ip/lwip_mn/lwipopts/include/lwipopts.h b/net/ip/lwip_mn/lwipopts/include/lwipopts.h
index 0d285dac8..ea1d14dec 100644
--- a/net/ip/lwip_mn/lwipopts/include/lwipopts.h
+++ b/net/ip/lwip_mn/lwipopts/include/lwipopts.h
@@ -86,7 +86,7 @@ extern "C" {
#define MEMP_NUM_PBUF 20
/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
per active UDP "connection". */
-#define MEMP_NUM_UDP_PCB 4
+#define MEMP_NUM_UDP_PCB MYNEWT_VAL_LWIP_NUM_UDP_PCB
/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
connections. */
diff --git a/net/ip/lwip_mn/lwipopts/syscfg.yml b/net/ip/lwip_mn/lwipopts/syscfg.yml
index e18898bbc..465aecdd0 100644
--- a/net/ip/lwip_mn/lwipopts/syscfg.yml
+++ b/net/ip/lwip_mn/lwipopts/syscfg.yml
@@ -42,6 +42,11 @@ syscfg.defs:
LWIP_IPV6:
description: Enable IPV6 support
value: 1
+ LWIP_NUM_UDP_PCB:
+ description: >
+ Number of UDP protocol control blocks, one per active UDP
+ socket (DHCP client and DHCP server use one each).
+ value: 4
syscfg.restrictions:
# As long as MEM_LIBC_MALLOC is 1 this restriction applies