Skip to content

Net namespace compatibility layer future work #99577

@jukkar

Description

@jukkar

Problem Description

The #99169 changed the network APIs so that either net_, NET_ or ZSOCK_ prefix was added to them.

Currently the network API compatibility flag CONFIG_NET_NAMESPACE_COMPAT_MODE is enabled by default. This flag allows user to continue to use old network API symbols without any changes. This automatic compat flag enablement also allows us to add network support to POSIX APIs in a more controlled way instead of implementing all changes in one PR.

The network stack needs some adjustments so that we don't need to automatically enable the compatibility mode flag CONFIG_NET_NAMESPACE_COMPAT_MODE in the Kconfig file. This RFC / proposal list future work that is still needed to accomplish that.

Proposed Change (Summary)

The various POSIX header files, like sys/socket.h etc., need to have support to all networking symbols found in net_compat.h.

Proposed Change (Detailed)

The POSIX symbols in net_compat.h should be placed into proper POSIX header file and made sure they can be compiled correctly if CONFIG_NET_NAMESPACE_COMPAT_MODE=n.

Eventually when everything works correctly, the CONFIG_NET_NAMESPACE_COMPAT_MODE flag could be deprecated although external modules might need that flag to function properly. We don't necessarily need to deprecate that flag.

Dependencies

No response

Concerns and Unresolved Questions

No response

Alternatives Considered

No response

Metadata

Metadata

Assignees

Labels

RFCRequest For Comments: want input from the communityarea: Networkingarea: POSIXPOSIX API Library

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions