Closed slaff closed 8 years ago
A lot of changes are related to passing tcp_pcb* pcb
instead of int fd
.
I am wondering if there is a less intrusive way to add raw LwIP support.
For instance, host application may define axtls_read(int, uint8_t*, size_t)
, axtls_write
, axtls_close
, as it now does for non-raw-lwip mode. Then all LwIP-related stuff may be contained within these wrappers (i.e. look up pcb pointer by fd, call tcp_output/pbuf_copy, etc.).
We can then compile these optional wrappers with this library, if user requests LWIP_RAW mode.
@igrr Can you revise this pull request? I rewrote the code completely and grouped the code that is needed in separate header and C files. There is also a readme file with short explanation how to use the code. The good thing about these changes is that they work out of the box with your axtls port and should work without any problem with future versions.
Related to #5 .