This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

CONFIG_NET_SOCKETS_POSIX_NAMES

POSIX names for Sockets API (without full POSIX API)

Type: bool

Help

With this option, Socket API functions are available under the
standard POSIX names like socket(), recv(), and close(), etc.,
even if full POSIX API (CONFIG_POSIX_API) is not enabled. (Note
that close() may require a special attention, as in POSIX it
closes any file descriptor, while with this option enabled, it
will apply only to sockets.)

Various networking libraries require either
CONFIG_NET_SOCKETS_POSIX_NAMES or CONFIG_POSIX_API to be set.
If both are disabled, Zephyr's socket functions will be
available (only) with ``zsock_`` prefix, (e.g. `zsock_socket`).
This is useful only in peculiar cases, e.g. when integrating
with 3rd-party socket libraries.

Direct dependencies

!POSIX_API && NET_SOCKETS && NETWORKING

(Includes any dependencies from ifs and menus.)

Default

Symbols that select this symbol

Kconfig definition

At subsys/net/lib/sockets/Kconfig:13

Included via Kconfig:8Kconfig.zephyr:44subsys/Kconfig:39subsys/net/Kconfig:89subsys/net/lib/Kconfig:30

Menu path: (Top) → Sub Systems and OS Services → Networking → Link layer and IP networking support → Network Libraries → BSD Sockets compatible API

config NET_SOCKETS_POSIX_NAMES
    bool "POSIX names for Sockets API (without full POSIX API)"
    default y if !POSIX_API
    depends on !POSIX_API && NET_SOCKETS && NETWORKING
    help
      With this option, Socket API functions are available under the
      standard POSIX names like socket(), recv(), and close(), etc.,
      even if full POSIX API (CONFIG_POSIX_API) is not enabled. (Note
      that close() may require a special attention, as in POSIX it
      closes any file descriptor, while with this option enabled, it
      will apply only to sockets.)

      Various networking libraries require either
      CONFIG_NET_SOCKETS_POSIX_NAMES or CONFIG_POSIX_API to be set.
      If both are disabled, Zephyr's socket functions will be
      available (only) with ``zsock_`` prefix, (e.g. `zsock_socket`).
      This is useful only in peculiar cases, e.g. when integrating
      with 3rd-party socket libraries.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)