Altera_Forum
Honored Contributor
20 years agolwip_ioctl adds offset?
Hi everybody,
I wrote a basic tftp server and before sendind the final ACK I store the received data to flash. Waiting for this ACK the client resends the last data package. After the data was stored in flash, I use lwip_ioctl to check if there is pending data in the receive buffer (the resend data) and empty it with lwip_recvfrom() before sending the final ACK. That works out pretty well, but most times there is an offset of 1956 added to the value returned by ioctl, sometimes (maybe 1 out of 100) it is a little bit less or more. Has anyone an idea where this offset comes from? Thanks for all information you can provide! --wolf