Lwip expects pbufs to have been used when the ip output routine has completed, so that they can be freed if necessary. The ARP mechanism, which might delay transmission while an ARP response is obtained, copies the pbuf in order to achieve this.
I'm using lwip with an ethernet driver that accepts a chain of buffers and executes a callback when the last has been sent. I could either : 1. Copy the pbufs with pbuf_take and then transmit the copies 2. Wait for completion of transmission (a semaphore on the callback) before returning from the output routine. Either of these is less efficient than the driver allows, which seems a shame. I'd prefer to : 3. Increase the reference count to the pbuf chain and free it in the callback. But presumably if this were possible, the ARP queue would do it, too. Can anyone suggest a better method, please ? -adrian _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
