I spent the last days studying how Enhanced Retransmission Mode(ERTM) should be implemented on L2CAP. Marcel recommended me to look at TCP[0] code. ERTM on L2CAP is very similar to TCP. Both have retransmission support, recovery error, acknowledgment of packets and timers.
That means that ERTM implementation will look like TCP implementation[1] on Linux. So, there is no need to write ERTM from scratch, I’ve already started to code and I’m basing my code on TCP code to get started with ERTM.
[0] http://en.wikipedia.org/wiki/Transmission_Control_Protocol
[1] http://vger.kernel.org/~davem/tcp_output.html
You mean “borrowing” code from TCP? I don’t know how the code is structured, but it could be nice to extract this “reliable delivery” part of TCP into a separate, protocol-agnostic library that could be reused by L2CAP and whoever else wants to implement reliable delivery. Of course, easier said than done :)
i can consent using the post