Re: RFC: BSD Socket (like) API

Paul Sokolovsky

Hello Daniel,

On Wed, 29 Mar 2017 11:25:19 +0100
Daniel Thompson <> wrote:

On 28/03/17 22:26, Paul Sokolovsky wrote:
So, now the concern is that we are left with two "BSD-like" APIs
doing essentially the same thing, one purporting to use less data
space, though shifting more complexity and code-space up to the
application, and allowing applications to be written one of two
(or both?) ways.
Let me start with the latter - I may imagine a particular
application will want to use either "BSD Socket like API" or
"native Zephyr API", but not both at the same time. If this idea is
sound, it may help us to better structure additions for new API
(make them less (least) intrusive).
I'm afraid I *don't* think this idea is sound!

The very reason we want BSD(-like) sockets is because we are
importing a big pile of third party library code into our application.

Importing third-party library code must not impose additional
requirements on application code (or *other* third party library
code) or integration will be a nightmare.
If we're talking about the same things, then there's no "imposing of
additional requirements". And the opposite of "integration nightmare"
is "configuration nightmare", where integration requires configuring so
many knobs that nobody realistically can do it anyway. That's why an
idea of "reasonable assumption" that if BSD Sockets API is enabled,
that we can grow each and every existing net_context structure by dozen
of bytes instead of introducing a special entity just for them.

In either case, detailed discussion of this matter is a bit premature.
Let's wait when it comes to actually making changes to Zephyr tree,
the current stage of work is being able to achieve BSD Sockets like
behavior out of tree, and there're enough things to discuss there
first (will post topics to the mailing list soon).

Paul | Open source software for ARM SoCs
Follow Linaro:!/linaroorg -

Join to automatically receive all group messages.