lwIP
startFeatures
-
Dual-stack IPv4 and IPv6 support with packet forwarding over multiple network interfaces.
-
Full TCP implementation featuring congestion control, RTT estimation, fast recovery, and fast retransmit.
-
UDP and experimental UDP-lite extensions for low-overhead transport.
-
ICMP and ICMPv6 support for network maintenance and diagnostic functions.
-
IGMP and MLDv1 support for managing multicast traffic and listener discovery.
-
Neighbor Discovery (ND) and stateless address autoconfiguration for IPv6 compliance (RFC 4861/4862).
-
Comprehensive IP addressing via DHCP, DHCPv6, AutoIP/APIPA (Zeroconf), and Address Conflict Detection (ACD).
-
DNS client including support for mDNS (Multicast DNS) responder.
-
Layered TCP (altcp) abstraction for transparent TLS integration, typically ported to mbedTLS.
-
Point-to-Point Protocol support including PPPoS (over Serial) and PPPoE (over Ethernet).
-
6LoWPAN adaptation layer for low-power wireless networks like IEEE 802.15.4 and BLE.
-
Integrated HTTP/HTTPS server with support for Server Side Includes (SSI) and CGI.
-
SNMPv2c/v3 agent with an included MIB compiler for network management.
-
MQTT client with optional TLS encryption for secure IoT messaging.
-
SNTP (Simple Network Time Protocol) implementation for clock synchronization.
-
NetBIOS name service responder and iPerf server for network performance testing.
Architecture
lwIP is designed with a modular architecture that balances the need for a layered protocol stack with the performance requirements of resource-constrained hardware. The core stack is contained within the src directory, while platform-specific ports and optional applications reside in the contrib directory. A central feature of its architecture is the pbuf (packet buffer) structure, which allows for zero-copy data handling as packets move through the various layers of the stack, significantly reducing CPU and memory overhead.
To accommodate different system designs, lwIP provides three distinct Application Programming Interfaces (APIs):
- Raw API: A callback-based, event-driven interface that provides the highest performance and lowest memory footprint by running directly in the TCP/IP thread.
- Netconn API: A sequential, thread-safe API that requires an operating system (RTOS) and provides a simplified programming model.
- Socket API: A BSD-compatible socket layer built on top of the Netconn API, facilitating the porting of existing standard networking code.
Use Cases
This library is ideal for:
- IoT End-Nodes: Small, battery-powered sensors using 6LoWPAN or BLE to communicate with gateways.
- Industrial Automation: PLCs and industrial controllers requiring reliable TCP/IP communication for Modbus/TCP or Ethernet/IP protocols.
- Embedded Web Servers: Devices providing local configuration or monitoring dashboards via HTTP or HTTPS.
- Network Gateways: Systems bridging traffic between different physical layers, such as Ethernet to Serial (PPP) or WiFi to 6LoWPAN.
- Resource-Constrained Systems: Microcontrollers with limited RAM (e.g., 20KB-50KB) that still require a full-featured, standards-compliant network stack.
Getting Started
Developers can begin by exploring the src directory for the core protocol implementations and the contrib directory for existing ports to various hardware and operating systems. The stack requires a header file named lwipopts.h to be defined by the user, which configures the stack’s features and memory limits at compile-time. For systems using an RTOS, a system abstraction layer (sys_arch) must be implemented to handle threading and synchronization. Comprehensive self-documentation extracted from the source code is available at the official lwIP documentation site, and development is centrally managed via the Savannah Git repository.
Related Projects (249)
View All 249 Projects →
ESP32 A2DP Sink with LDAC, aptX HD, and AAC Support
A premium Bluetooth audio receiver firmware for ESP32-WROVER modules that enables high-resolution streaming via LDAC and aptX codecs. It features a custom DSP pipeline for 3D audio enhancement, real-time LED matrix visualization, and a secure OTA recovery system built on FreeRTOS.
GhostESP
GhostESP is a multi-protocol security testing toolkit for ESP32 microcontrollers, built on the ESP-IDF framework and FreeRTOS. It provides extensive capabilities for Wi-Fi, BLE, Sub-GHz, NFC, and Infrared auditing across a wide range of hardware, including M5Stack devices and custom development boards.
POSEIDON
A keyboard-focused pentesting firmware for the M5Stack Cardputer-Adv (ESP32-S3) offering over 90 features across WiFi, BLE, sub-GHz, and LoRa. It utilizes FreeRTOS and the NimBLE stack to coordinate complex wireless attacks, including 5 GHz deauthentication and Zigbee sniffing via a companion ESP32-C5 node.
ESP32 UART Bridge
A high-performance serial communication hub for ESP32 and ESP32-S3 microcontrollers that bridges UART data to USB, WiFi, and Bluetooth. It features protocol-aware optimizations for MAVLink, SBUS, and CRSF, and includes a comprehensive web-based configuration interface.
SVITRIX Firmware
SVITRIX is an open-source, AI-developed firmware for the Ulanzi Smart Pixel Clock TC001 and custom ESP32-based LED matrices. It features a robust MQTT and HTTP API for integration with home automation systems like HomeAssistant, supporting dynamic custom apps, visual effects, and real-time environmental sensor data.
UltrafastSecp256k1
A high-performance, multi-backend secp256k1 elliptic curve cryptography engine optimized for CPU, GPU, and embedded systems. It supports a comprehensive cryptographic stack including ECDSA, Schnorr, and ZK proofs, targeting platforms like ESP32, STM32, and RISC-V.
Zhilly AI Pentester Assistant
Zhilly is an AI-powered portable cybersecurity tool for ESP32-S3 devices, enabling voice-controlled pentesting, RF/IR signal manipulation, and HID emulation. Built on the ESP-IDF framework, it utilizes FreeRTOS, LVGL, and NimBLE to provide a sophisticated, hands-free interaction model for security researchers.
RuView
RuView is an open-source WiFi sensing platform that leverages Channel State Information (CSI) from ESP32-S3 sensors to perform human pose estimation, vital sign monitoring, and environment mapping. It utilizes a high-performance Rust-based processing pipeline and FreeRTOS-powered firmware to enable camera-free, privacy-preserving spatial intelligence at the edge.