BSD-style socket API. Thread-safe, to be called from non-TCPIP threads only. Can be activated by defining LWIP_SOCKET to 1. Header is in posix/sys/socket.h