How lwip-tcpip/lwip works
lwIP is a compact embedded TCP/IP stack. An application sends or receives traffic through the raw or socket APIs; the stack’s transport and IP layers process packets and hand them to network interfaces. The graph also preserves the README’s major protocol and application capabilities. Several internal runtime links are shown as unverified because the sampled excerpts expose headers and source-index references, not their complete call paths.
Main entry points: netif.c Network interface · ip4.c IPv4 · api_msg.c API messages · udp.c UDP
Components 23
Application APIs
- Socket API
src/api/sockets.c - Raw API
src/api/api_lib.c - API messages
src/api/api_msg.c - TCP/IP thread API
src/api/tcpip.c
Network protocols
- TCP
src/core/tcp.c - UDP
src/core/udp.c - IPv4
src/core/ipv4/ip4.c - IPv6
src/core/ipv6/ip6.c - Address configuration
src/core/ipv4/dhcp.c - DNS and mDNS
src/core/dns.c - PPP
src/netif/ppp/ppp.c
Packet and runtime support
- Packet buffers
src/core/pbuf.c - Memory pools
src/core/memp.c
Network applications
- HTTP server/client
src/apps/http/httpd.c - SNMP agent
src/apps/snmp/snmp_core.c - MQTT client
src/apps/mqtt/mqtt.c - SNTP client
src/apps/sntp/sntp.c - NetBIOS responder
src/apps/netbiosns/netbiosns.c
Interfaces and ports
- Network interface
src/core/netif.c - Ethernet framing
src/netif/ethernet.c - Platform port
contrib/ports/freertos/sys_arch.c
Other components
- Embedded application
- Network peer
Connections 26
- Embedded application → Socket API: uses sockets
README - Embedded application → Raw API: uses raw API
README - Socket API → API messages: calls
src/api/sockets.c - API messages → TCP: dispatches
- API messages → UDP: dispatches
- TCP/IP thread API → API messages: processes messages
- TCP → IPv4: uses IP
- UDP → IPv4: uses IP
- IPv4 → Network interface: routes packets
- IPv6 → Network interface: routes packets
- Network interface → Ethernet framing: uses framing
- Network interface → Platform port: uses system services
- Network peer → Network interface: supplies packets
- Network interface → Network peer: transmits packets
- Packet buffers → TCP: buffers segments
- Packet buffers → UDP: buffers datagrams
- Memory pools → Packet buffers: supports allocation
- Address configuration → IPv4: configures addressing
- DNS and mDNS → UDP: uses transport
- PPP → IPv4: carries IP
- PPP → IPv6: carries IP
- HTTP server/client → Embedded application: serves requests
README - SNMP agent → Embedded application: exposes management
README - MQTT client → Embedded application: provides messaging
README - SNTP client → Embedded application: provides time sync
README - NetBIOS responder → Embedded application: provides naming
README