wolfSSL, known for its open-source SSL/TLS library, has introduced wolfIP, an open-source, lightweight TCP/IP stack without dynamic memory allocations, ideal for resource-limited embedded systems. It can function as both an endpoint and support multiple interfaces with optional IP forwarding. By default, wolfIP works as a network endpoint but can be configured for traffic forwarding across multiple interfaces.
Key features of wolfIP include:
– BSD-like, non-blocking socket API with customizable callbacks
– No dynamic memory allocation with a fixed number of concurrent sockets and pre-allocated buffers for packet processing. Parameters can be adjusted in config.h:
“`
#define MAX_TCPSOCKETS 4
#define MAX_UDPSOCKETS 2
#define MAX_ICMPSOCKETS 2
#define RXBUF_SIZE (20 * 1024)
#define TXBUF_SIZE (32 * 1024)
“`
– Protocols:
– Data Link: IEEE 802.3 Ethernet II frame encapsulation, ARP
– Network: IPv4 delivery, optional IPv4 forwarding, ICMP, IPsec
– Transport: UDP and TCP
– Applications: DHCP, DNS, HTTP/HTTPS (via wolfSSL)
– VPN: FIPS-compliant WireGuard through wolfGuard (P-256, AES-256-GCM, SHA-256), not interoperable with standard WireGuard peers
– FreeRTOS port availability
Embedded systems’ microcontrollers and microprocessors often face challenges with limited resources, lack of memory management units, and restricted heap space, making dynamic allocation risky and prone to crashes. The absence of malloc enhances system stability.
The GPLv3 licensed C source code is available with API documentation, guides for STM32 microcontrollers with Ethernet, and tools on GitHub. Alternatively, the smoltcp library in Rust can be configured without dynamic allocation for those requiring IPv6 support.
Via Adafruit
Jean-Luc Aufranc started CNX Software in 2010, becoming a full-time writer in 2011 after leaving his software engineering manager position.
Support CNX Software by donating via cryptocurrencies, becoming a Patron on Patreon, or purchasing through Amazon or Aliexpress. Articles may contain affiliate links.
