Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
net/: Trivial changes to PR from review. Biggest difference: type of s_error changed to int16_t to save a byte or two.
Author: liuhuahang <liuhuahang@xiaomi.com>
Implement SO_ERROR for getsockopt()
net/: psock_recvfrom() is an internal interface and should not set the errno nor should it be a cancellation point.
net/: psock_accept() is not a cancellation point.
net/: psock_getsockopt() and psock_socket*9 are an internal interfaces and should not set the errno.
net/: psock_getsockopt() is an internal interface and should not set the errno.
net/: psock_listen() is an internal interface and should not set the errno.
net/: psock_connect(( is an internal interface and should not set the errno nor should it be a cancellation point.
net/: psock_bind() is an internal interface and should not set the errno.
net/: psock_accept() is an internal interface and should not set the errno.
User-space networking stack API allows user-space daemon to
provide TCP/IP stack implementation for NuttX network.
Main use for this is to allow use and seamless integration of
HW-provided TCP/IP stacks to NuttX.
For example, user-space daemon can translate /dev/usrsock
API requests to HW TCP/IP API requests while rest of the
user-space can access standard socket API, with socket
descriptors that can be used with NuttX system calls.