Skip to content

Deprecate NET_SOCKETS_POSIX_NAMES option #69950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d6ef755
net: sockets: Deprecate CONFIG_NET_SOCKETS_POSIX_NAMES
jukkar Mar 7, 2024
b1e4364
net: socket: Rework the zephyr/net/socket.h header
jukkar Mar 7, 2024
d4d02bb
net: socket: Create zsock_fcntl and fsock_ioctl functions
jukkar Mar 7, 2024
78a795b
net: sockets: Fix the documentation to use POSIX_API
jukkar Mar 7, 2024
c50b91e
net: tftp: Use zsock_ API functions
jukkar Mar 7, 2024
95f2a14
net: socks: Remove socket selection
jukkar Mar 7, 2024
6652da8
net: websocket: Use zsock_ API calls
jukkar Mar 8, 2024
f6cc99b
tests: net: socket: tls_ext: Use POSIX_API
jukkar Mar 8, 2024
0eb10bf
tests: net: sockets: Remove use of NET_SOCKETS_POSIX_NAMES
jukkar Mar 8, 2024
484f1d3
samples: net: Change to use CONFIG_POSIX_API
jukkar Mar 8, 2024
3d64794
mgmt: updatehub: Use zsock_ API functions
jukkar Mar 7, 2024
a652b19
mgmt: mcumgr: transport: udp: Select POSIX_API
jukkar Mar 8, 2024
23d3563
doc: net: Remove the mention of NET_SOCKETS_POSIX_NAMES
jukkar Mar 8, 2024
dcb7869
doc: migration-guide-3.7: Add NET_SOCKETS_POSIX_NAMES info
jukkar Mar 8, 2024
e7c0be0
shell: mqtt: Avoid using POSIX function names
jukkar Mar 8, 2024
cd82021
samples: net: echo-server: Adjust CONFIG_MAX_THREAD_BYTES
jukkar Mar 8, 2024
79703c2
tests: net: lwm2m: Fix zsock_fcntl impl name
jukkar Mar 8, 2024
3a39d5f
samples: net: sockets: can: Fix the test termination criteria
jukkar Mar 10, 2024
cc9eda6
net: sockets: Use only Zephyr POSIX headers
jukkar Mar 10, 2024
7fdf630
net: Use always zephyr/posix/fcntl.h
jukkar Mar 10, 2024
259935c
samples: net: Disable native_sim net USB driver in samples
jukkar Mar 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/connectivity/networking/api/sockets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ compatible API implementation for Zephyr:
* Is namespaced by default, to avoid name conflicts with well-known
names like ``close()``, which may be part of libc or other POSIX
compatibility libraries.
If enabled by :kconfig:option:`CONFIG_NET_SOCKETS_POSIX_NAMES`, it will also
If enabled by :kconfig:option:`CONFIG_POSIX_API`, it will also
expose native POSIX names.

BSD Sockets compatible API is enabled using :kconfig:option:`CONFIG_NET_SOCKETS`
Expand All @@ -35,7 +35,7 @@ config option and implements the following operations: ``socket()``, ``close()``
Based on the namespacing requirements above, these operations are by
default exposed as functions with ``zsock_`` prefix, e.g.
:c:func:`zsock_socket` and :c:func:`zsock_close`. If the config option
:kconfig:option:`CONFIG_NET_SOCKETS_POSIX_NAMES` is defined, all the functions
:kconfig:option:`CONFIG_POSIX_API` is defined, all the functions
will be also exposed as aliases without the prefix. This includes the
functions like ``close()`` and ``fcntl()`` (which may conflict with
functions in libc or other libraries, for example, with the filesystem
Expand Down
12 changes: 12 additions & 0 deletions doc/releases/migration-guide-3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,18 @@ Bluetooth Classic
Networking
**********

* Deprecate the :kconfig:option:`CONFIG_NET_SOCKETS_POSIX_NAMES` option. It is a legacy option
and was used to allow user to call BSD socket API while not enabling POSIX API.
This could cause complications when building applications that wanted to enable the
:kconfig:option:`CONFIG_POSIX_API` option. This means that if the application wants to use
normal BSD socket interface, then it needs to enable :kconfig:option:`CONFIG_POSIX_API`.
If the application does not want or is not able to enable that option, then the socket API
calls need to be prefixed by a ``zsock_`` string.
All the sample applications that use BSD socket interface are changed to enable
:kconfig:option:`CONFIG_POSIX_API`. Internally the network stack will not enable POSIX API
option which means that various network libraries that use sockets, are converted to
use the ``zsock_*`` API calls. (:github:`69950`)

* The zperf zperf_results struct is changed to support 64 bits transferred bytes (total_len)
and test duration (time_in_us and client_time_in_us), instead of 32 bits. This will make
the long-duration zperf test show with correct throughput result.
Expand Down
1 change: 0 additions & 1 deletion doc/services/portability/posix/kconfig/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ implementation of the POSIX API.
* :kconfig:option:`CONFIG_NET_SOCKETPAIR`
* :kconfig:option:`CONFIG_NET_SOCKETS`
* :kconfig:option:`CONFIG_NET_SOCKETS_POLL_MAX`
* :kconfig:option:`CONFIG_NET_SOCKETS_POSIX_NAMES`
* :kconfig:option:`CONFIG_POSIX_API`
* :kconfig:option:`CONFIG_POSIX_CLOCK`
* :kconfig:option:`CONFIG_POSIX_FS`
Expand Down
Loading