lwIP

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

LwIP
Original author(s)Adam Dunkels
Developer(s)lwIP developers group
Stable release
2.1.2 / 22 December 2018; 6 months ago (2018-12-22)
Repository Edit this at Wikidata
Written inC
Operating systemmultiple
Platformembedded systems
TypeIP stack
LicenseModified BSD license
Websitesavannah.nongnu.org/projects/lwip/

lwIP (lightweight IP) is a widely used open-source TCP/IP stack designed for embedded systems. lwIP was originally developed by Adam Dunkels at the Swedish Institute of Computer Science and is now developed and maintained by a worldwide network of developers.

lwIP is used by many manufacturers of embedded systems. Examples include Altera (in the Nios II operating system), Analog Devices (for the Blackfin DSP chip),[1] Xilinx,[2] Honeywell (for some of their FAA certified avionics systems) and Freescale Semiconductor (Ethernet Streaming SW for Automotive microcontrollers).

lwIP network stack[edit]

The focus of the lwIP network stack implementation is to reduce resource usage while still having a full-scale TCP stack.[3] This makes lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM.

lwIP protocol implementations[edit]

Aside from the TCP/IP stack, lwIP has several other important parts, such as a network interface, an operating system emulation layer, buffers and a memory management section. The operating system emulation layer and the network interface allow the network stack of lwIP to work properly when the lwIP module is transplanted into an operating system, as it provides a common interface between lwIP code and the operating system kernel.[3]

At the Internet layer the network stack of lwIP includes an IP (Internet Protocol) implementation that can handle packet forwarding over multiple network interfaces.[3] Both IPv4 and IPv6 are supported dual stack since lwIP v2.0.0 .[4] For network maintenance and debugging, lwIP implements ICMP (Internet Control Message Protocol).[3] IGMP (Internet Group Management Protocol) is supported for multicast traffic management. While ICMPv6 including MLD is implemented to support the use of IPv6.[citation needed]

To support the Internet protocol (IP) of lwIP for Ethernet at the data link layer an implementation of IPv4 ARP (Address Resolution Protocol) is required and of the IPv6 Neighbor Discovery Protocol. lwIP may also be operated on top a PPP (Point-to-Point Protocol) implementation at the data link layer.[citation needed]

At the transport layer lwIP implements TCP (Transmission Control Protocol) with congestion control, RTT estimation and fast recovery/fast retransmit.[3] UDP (User Datagram Protocol) is implemented with experimental UDP-Lite extensions.[citation needed]

APIs and sockets[edit]

lwIP provides a specialized no-copy application programming interface (API) for enhanced network stack performance. The Berkeley socket API is optional.[3] Raw sockets, or raw pcbs, are provided depending on the API used.[5]

Application layer support[edit]

At the application layer the lwIP network stack may be supported through the implementation of the following protocols. The DNS (Domain Name System), an SNMP (Simple Network Management Protocol) agent, in v1, v2 or v3, with private MIB (management information base) support and MIB compiler.

Operating systems that implement the lwIP TCP/IP stack may provide a range of supporting clients and servers at the application layer. Such as an IPv4 DHCP (Dynamic Host Configuration Protocol) client or IPv4 Link-local addresses (aka. AutoIP). Specialized raw API applications include: an HTTP server, a SNTP client, a SMTP client, a NetBIOS nameserver, a mDNS responder, a MQTT client and a TFTP server.[citation needed]

OS implementations[edit]

lwIP is used as network stack in ReactOS and Genode[6] and can be used in Minix and GNU Hurd to implement network servers.

See also[edit]

References[edit]

  1. ^ "Building Complex VDK/LwIP Applications Using Blackfin Processors ", Kaushal Sanghai, Analog Devices Inc. September 2008
  2. ^ Siva Velusamy, LightWeight IP (lwIP) Application Examples, Xilinx Inc. June 2009
  3. ^ a b c d e f (ed.), Yanwen Wu (2010). Software engineering and knowledge engineering : theory and practice. Berlin: Springer. p. 639. ISBN 978-3-642-03717-7.CS1 maint: Extra text: authors list (link)
  4. ^ http://www.nongnu.org/lwip/2_0_x/upgrading.html
  5. ^ lwIP functions documentation
  6. ^ "Release notes for the Genode OS Framework 9.11".

External links[edit]