https://github.com/eriksl/esp8266-basic-bridge and there is the "other side", the code to be run on the esp8266
Not sure this is quite what I need.
This implementation doesn't let the host open the socket, it still opens the socket from the esp8266.
Is there somewhere I can find out how to write to the MAC registers?
Writing a buffer (complete IP packet) straight to the WiFi registers would solve my problem.