Mistake on this page?
Report an issue in GitHub or email us
Modules
APIs

lwIP provides three Application Program's Interfaces (APIs) for programs to use for communication with the TCP/IP code: More...

Modules

 "raw" APIs
 Non thread-safe APIs, callback style for maximum performance and minimum memory footprint.
 
 Sequential-style APIs
 Sequential-style APIs, blocking functions.
 
 Socket API
 BSD-style socket API.
 

Detailed Description

lwIP provides three Application Program's Interfaces (APIs) for programs to use for communication with the TCP/IP code:

The raw TCP/IP interface allows the application program to integrate better with the TCP/IP code. Program execution is event based by having callback functions being called from within the TCP/IP code. The TCP/IP code and the application program both run in the same thread. The sequential API has a much higher overhead and is not very well suited for small systems since it forces a multithreaded paradigm on the application.

The raw TCP/IP interface is not only faster in terms of code execution time but is also less memory intensive. The drawback is that program development is somewhat harder and application programs written for the raw TCP/IP interface are more difficult to understand. Still, this is the preferred way of writing applications that should be small in code size and memory usage.

All APIs can be used simultaneously by different application programs. In fact, the sequential API is implemented as an application program using the raw TCP/IP interface.

Do not confuse the lwIP raw API with raw Ethernet or IP sockets. The former is a way of interfacing the lwIP network stack (including TCP and UDP), the latter refers to processing raw Ethernet or IP data instead of TCP connections or UDP packets.

Raw API applications may never block since all packet processing (input and output) as well as timer processing (TCP mainly) is done in a single execution context.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.