From ffc425191eb3000b71cc9fc60853b595e157cbcf Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Tue, 5 Dec 2023 12:57:18 +0100 Subject: [PATCH] net: doc: Remove Network Connectivity API page The Network Connectivity API page is kind of pointless, as it provides little information (which can be found elsewhere as well) and it was pointer out that it kind of creates noise in the documentation as it can be confused with the page which provides a summary of network APIs. Therefore, remove the page, and move the information from it elsewhere. The brief summary of what APIs to use was moved the Networking APIs index page. The information about the samples demonstrating BSD sockets API usage was moved to the BSD sockets documentation page itself. Signed-off-by: Robert Lubos --- doc/_scripts/redirects.py | 1 + doc/connectivity/networking/api/index.rst | 11 +++++++++++ doc/connectivity/networking/api/sockets.rst | 4 ++++ doc/connectivity/networking/index.rst | 1 - .../networking/networking-api-usage.rst | 16 ---------------- 5 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 doc/connectivity/networking/networking-api-usage.rst diff --git a/doc/_scripts/redirects.py b/doc/_scripts/redirects.py index 6101ca8faa8..dfabef8b880 100644 --- a/doc/_scripts/redirects.py +++ b/doc/_scripts/redirects.py @@ -17,6 +17,7 @@ REDIRECTS = [ ('application/index', 'develop/application/index'), ('boards/x86/ehl_crb/doc/index', 'boards/x86/intel_ehl/doc/index'), ('boards/x86/rpl_crb/doc/index', 'boards/x86/intel_rpl/doc/index'), + ('connectivity/networking/networking-api-usage', 'connectivity/networking/api/index'), ('development_process/code_flow', 'project/code_flow'), ('development_process/index', 'project/index'), ('development_process/issues', 'project/issues'), diff --git a/doc/connectivity/networking/api/index.rst b/doc/connectivity/networking/api/index.rst index 2386a075460..1264ff2aafb 100644 --- a/doc/connectivity/networking/api/index.rst +++ b/doc/connectivity/networking/api/index.rst @@ -3,6 +3,17 @@ Networking APIs ############### +Zephyr provides support for the standard BSD socket APIs (defined in +:zephyr_file:`include/zephyr/net/socket.h`) for the applications to +use. See :ref:`BSD socket API ` for more details. + +Apart of the standard API, Zephyr provides a set of custom networking APIs and +libraries for the application to use. See the list below for details. + +.. note:: + The legacy connectivity API in :zephyr_file:`include/zephyr/net/net_context.h` + should not be used by applications. + .. toctree:: :maxdepth: 2 diff --git a/doc/connectivity/networking/api/sockets.rst b/doc/connectivity/networking/api/sockets.rst index 139f4192444..5ea4429cf13 100644 --- a/doc/connectivity/networking/api/sockets.rst +++ b/doc/connectivity/networking/api/sockets.rst @@ -57,6 +57,10 @@ there is a table mapping file descriptors to internal object pointers. The file descriptor table is used by the BSD Sockets API even if the rest of the POSIX subsystem (filesystem, stdin/stdout) is not enabled. +See :zephyr:code-sample:`sockets-echo-server` and :zephyr:code-sample:`sockets-echo-client` +sample applications to learn how to create a simple server or client BSD socket based +application. + .. _secure_sockets_interface: Secure Sockets diff --git a/doc/connectivity/networking/index.rst b/doc/connectivity/networking/index.rst index f900bb56330..14efb069eac 100644 --- a/doc/connectivity/networking/index.rst +++ b/doc/connectivity/networking/index.rst @@ -12,7 +12,6 @@ operation of the stacks and how they were implemented. overview.rst net-stack-architecture.rst - networking-api-usage.rst networking_with_host.rst network_monitoring.rst api/index.rst diff --git a/doc/connectivity/networking/networking-api-usage.rst b/doc/connectivity/networking/networking-api-usage.rst deleted file mode 100644 index 0145482fec9..00000000000 --- a/doc/connectivity/networking/networking-api-usage.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. _networking_api_usage: - -Network Connectivity API -######################## - -Applications should use the BSD socket API defined in -:zephyr_file:`include/zephyr/net/socket.h` to create a connection, send or receive data, -and close a connection. The same API can be used when working with UDP or -TCP data. See :ref:`BSD socket API ` for more details. - -See :zephyr:code-sample:`sockets-echo-server` and :zephyr:code-sample:`sockets-echo-client` -sample applications to learn how to create a simple server or client BSD socket based -application. - -The legacy connectivity API in :zephyr_file:`include/zephyr/net/net_context.h` should not be -used by applications.