I'd like to use libnyoci on an Espressif ESP32 system (SparkFun's ESP32 Thing.) The software stack for this is the ESP IoT Development Framework, ESP-IDF, which uses lwIP for IP networking. This is apparently a pretty widespread IP stack; Wikipedia says "lwIP is used by many manufacturers of embedded systems. Examples include Altera (in the Nios II operating system), Analog Devices (for the Blackfin DSP chip), Xilinx, Honeywell ... and Freescale."
Most of libnyoci builds fine, but there are a bunch of errors in plat-net/posix/ due to missing functionality in lwIP:
The first issue is the hardest one for me, since I don't know much about either poll or select. Looks like I need to reimplement nyoci_plat_wait and nyoci_plat_process using nyoci_plat_update_fdsets. Probably easy, but I'd appreciate any clues.
The second and third issues seem to be related to multihoming; not a problem for my use case because my board only has a single (WiFi) interface.
The other issues I think I've fixed locally.
I'd like to use libnyoci on an Espressif ESP32 system (SparkFun's ESP32 Thing.) The software stack for this is the ESP IoT Development Framework, ESP-IDF, which uses lwIP for IP networking. This is apparently a pretty widespread IP stack; Wikipedia says "lwIP is used by many manufacturers of embedded systems. Examples include Altera (in the Nios II operating system), Analog Devices (for the Blackfin DSP chip), Xilinx, Honeywell ... and Freescale."
Most of libnyoci builds fine, but there are a bunch of errors in
plat-net/posix/due to missing functionality in lwIP:pollisn't supported, sonyoci_plat_update_pollfdsneeds to be#ifdef'd out, but thennyoci_plat_waitandnyoci_plat_processbreak because they call it.cmsgheaderand all its ancillary types and constants aren't defined. This breakssendtofrom.ipv6_mreqis calledip6_mreqfor some reason, and itsipv6mr_interfacefield is of typein6_addrnotint, i.e. it wants the IP address of the interface, not its index in the interface list (which doesn't seem to exist; there is nogetifaddrs.)in_pktinfoandin6_pktinfoaren't defined. This breaks thepktinfofield ofnyoci_plat_s(which seems to be unused. It's written to innyoci_plat_process, but never read.)IN6_IS_ADDR_V4MAPPEDis not defined. I worked around this by copying in the definition from macOS's<in6.h>.<sys/select.h>for some reason, insteadselectis in<lwip/sockets.h>.The first issue is the hardest one for me, since I don't know much about either poll or select. Looks like I need to reimplement
nyoci_plat_waitandnyoci_plat_processusingnyoci_plat_update_fdsets. Probably easy, but I'd appreciate any clues.The second and third issues seem to be related to multihoming; not a problem for my use case because my board only has a single (WiFi) interface.
The other issues I think I've fixed locally.