On this page
Overview
lwIP is a C TCP/IP stack for adding network communication to memory-constrained embedded devices. It provides IPv4, IPv6, TCP, UDP, DHCP, DNS, and other protocols, with callback-style raw, sequential, and BSD-like socket APIs for different system architectures. This GitHub repository mirrors the official source developed on Savannah.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Provide core TCP/IP features within a small memory budget
The README targets embedded systems with tens of kilobytes of free RAM and roughly 40 kilobytes of ROM. Its selectable features include IPv4, IPv6, ICMP, TCP, UDP, DHCP, DNS, PPP, and 6LoWPAN, plus applications such as an HTTP server, MQTT client, and SNTP.
Sources: [1]
Choose APIs and OS integration for the runtime
lwIP offers a callback-based raw API for low overhead, sequential APIs for calls from other threads, and a BSD-like socket compatibility API. No-OS mainloop mode and OS mode with a TCPIP thread have different available APIs and call-context rules.
Sources: [2]
Best fit
Fits network ports for RTOS and bare-metal devices
lwIP fits sensors, controllers, and IoT devices that cannot simply use a general-purpose operating system's network stack. It is suitable when a team will implement the network interface, timing, locking, and memory hooks for its hardware and enable only the protocols it needs.
Before adoption
Design the port and execution contexts for each device
lwIP is not a complete standalone network application. A port needs device drivers, OS abstractions, timers, and an lwipopts.h configuration adapted from the supplied examples. GitHub reports NOASSERTION for SPDX metadata, while the pinned README states that lwIP is available under a BSD license.
Raw APIs execute in the lwIP core context and callbacks must not block. The official documentation identifies calls from interrupt context as a common pitfall and requires OS-mode raw API calls to run in the TCPIP thread or under the correct core lock.
Official sources
- [1]lwIP STABLE-2_2_1_RELEASE README(2026-10-04)
- [2]lwIP STABLE-2_2_1_RELEASE API and porting documentation(2026-10-04)
- [3]lwIP STABLE-2_2_1_RELEASE CMake configuration(2026-10-04)
Supplemental curator note
Evaluate the API model, operating-system mode, network interface, and memory configuration as one design rather than selecting from the protocol list alone. Establish the interrupt and lwIP-core execution boundaries early.
Try it in 3 steps
- 1
Clone the pinned source
Enter the lwIP 2.2.1 source reviewed for this guide.
git clone --branch STABLE-2_2_1_RELEASE --depth 1 https://github.com/lwip-tcpip/lwip.git && cd lwip - 2
Configure the Unix example
Copy the Unix example configuration template included in the repository, then configure example_app on Linux, macOS, or FreeBSD. CMake and a C compiler are required. Review lwipcfg.h for the target environment before an embedded port.
cp contrib/examples/example_app/lwipcfg.h.example contrib/examples/example_app/lwipcfg.h && cmake -S . -B build - 3
Build the example
From the same working directory, compile the Unix port example included under contrib. This checks the host build configuration; it does not validate a target-device port or network behavior.
cmake --build build
Growth
Growth trends · Last 30 days
1,762 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 0
- Open PRs
- 63
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
- Stars
- 1,762
- Forks
- 634
- Watchers
- 36
- Open issues
- 0
- Contributors
- 103
- Owner type
- Organization
- Primary language
- C
- License
- Not determined
- Repository last updated
- Sep 1, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Arduino-ESP3217,465 Stars
2 shared tag(s) · 1 shared category(s)
develop for the ESP32 SoC family with the official Arduino core, libraries, board definitions, and integrated Espressif toolchains
C++ - GIMP6,470 Stars
2 shared tag(s) · Same language
open-source raster editing with expanded non-destructive workflows in the 3.2 series
C - Apache HTTP Server4,035 Stars
1 shared tag(s) · 2 shared category(s) · Same language
run web serving, TLS, virtual hosts, and reverse proxying through a modular server configuration
C - Git63,582 Stars
1 shared tag(s) · 1 shared category(s) · Same language
keep complete history locally and synchronize repositories as distributed peers
C - curl43,060 Stars
1 shared tag(s) · 1 shared category(s) · Same language
share URL-based transfer capabilities between a CLI and libcurl
C - jq35,741 Stars
1 shared tag(s) · 1 shared category(s) · Same language
slice, filter, transform, and aggregate JSON inside shell pipelines
C
Report incorrect information
Tell us if any listing information is incorrect or outdated.