tcpip_adapter: Update header descriptions, constify some parameters

This commit is contained in:
Angus Gratton
2018-12-03 18:11:53 +11:00
committed by Angus Gratton
parent b240a181b7
commit ede47ed33a
6 changed files with 410 additions and 325 deletions

View File

@@ -1,8 +0,0 @@
lwIP TCP/IP API
***************
Application Example
-------------------
Example code for TCP/IP socket APIs is provided in :example:`protocols/sockets` directory of ESP-IDF examples.

View File

@@ -1,20 +1,19 @@
TCP/IP Adapter
==============
The purpose of TCP/IP Adapter library is twofold. First, it provides an abstraction layer for the application on top of the IP stack, to allow applications to choose between IP stacks in the future. Second, the APIs it provides are thread safe, even if the underlying IP stack APIs are not.
The purpose of TCP/IP Adapter library is twofold:
In many cases, application does not need to call TCP/IP Adapter APIs itself. A few cases when such calls are needed are related to :doc:`event handling <../../api-guides/event-handling>`.
- It provides an abstraction layer for the application on top of the TCP/IP stack. This will allow applications to choose between IP stacks in the future.
- The APIs it provides are thread safe, even if the underlying TCP/IP stack APIs are not.
The aim of this adapter is to provide an abstraction layer between the TCP/IP stack and the network interface layer (currently Wi-Fi or Ethernet), and general network interface management.
ESP-IDF currently implements TCP/IP Adapter for the :doc:`lwIP <lwip>` TCP/IP stack only. However, the adapter itself is TCP/IP implementation agnostic and different implementations are possible.
ESP-IDF currently implements TCP/IP Adapter for the lwIP TCP/IP stack only. However, the adapter itself is TCP/IP implementation agnostic and different implementations are possible.
Some TCP/IP Adapter API functions are intended to be called by application code, for example to get/set interface IP addresses, configure DHCP. Other functions are intended for internal ESP-IDF use by the network driver layer.
In many cases, applications do not need to call TCP/IP Adapter APIs directly as they are called from the default network event handlers.
API Reference
-------------
.. include:: /_build/inc/tcpip_adapter.inc
.. include:: /_build/inc/tcpip_adapter_lwip.inc