Commit Graph

1 Commits

Author SHA1 Message Date
Marcin Niestroj 07edc9a070 drivers: net: nsos: new driver for Native Simulator offloaded sockets
Add driver for 'native_sim' target that implements offloaded socket
networking by the use of host networking stack and wrapped BSD sockets API.

This driver has following advantages over existing networking drivers for
emulated platforms that are already in tree:
 * no TUN/TAP use means that no additional setup is required on the host
   side:
   * possible to use it within unpriviledged Docker containers, either for
     development or in CI
 * possibility to use and test offloaded sockets
   (CONFIG_NET_SOCKETS_OFFLOAD=y) with emulated target, which allows
   to increase tests coverage of this feature, without requirement of using
   hardware

Native Simulator host libc has different error codes than embedded libc
used by Zephyr. Convert between those.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-22 14:39:27 +01:00