Out of order packet processing
lordbuddha opened this issue · comments
When processing a TCP stream I manage to extract custom messages from that stream, but at some point I lose the framing of those messages. I see in Wireshark I have out of order packets in the capture and I assume that is what is upsetting my code.
Is there a way of processing the packets in a corrected order ?
pkts.io doesn't have automatic support that re-arranges the TCP stream in the correct order. It merely allows you to read the pcaps and you will have to add custom code to do so. Note: I have a Stream interface that would be the place to add your code (so create a TcpStream) but yeah, I've never had the need myself so therefore I haven't implemented it. Pull requests very much welcome! :-)
Thanks for the answer.
Filtering duplicates would be easy, but no idea how the sequence numbers work.
Ah,,, sequence+length = next sequence...