CONFIG_NET_SOCKETS_POSIX_NAMES

Standard POSIX names for Sockets API

Type: bool

Help

By default, Sockets API function are prefixed with zsock_ to avoid namespacing issues. If this option is enabled, they will be provided with standard POSIX names like socket(), recv(), and close(), to help with porting existing code. Note that close() may require a special attention, as in POSIX it closes any file descriptor, while with this option enabled, it will still apply only to sockets.

Direct dependencies

!POSIX_API && NET_SOCKETS && NETWORKING

(Includes any dependencies from ifs and menus.)

Defaults

No defaults. Implicitly defaults to n.

Kconfig definition

At <Zephyr>/subsys/net/lib/sockets/Kconfig:13

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:34<Zephyr>/subsys/Kconfig:34<Zephyr>/subsys/net/Kconfig:89<Zephyr>/subsys/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 "Standard POSIX names for Sockets API"
    depends on !POSIX_API && NET_SOCKETS && NETWORKING
    help
      By default, Sockets API function are prefixed with zsock_ to avoid
      namespacing issues. If this option is enabled, they will be provided
      with standard POSIX names like socket(), recv(), and close(), to help
      with porting existing code. Note that close() may require a special
      attention, as in POSIX it closes any file descriptor, while with this
      option enabled, it will still apply only to sockets.

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