tcpipcommunicationsegmenttelecommunication

Reassembly of segments


I am working on an application that intercepts various kinds of traffic. Recently I have been receiving out-of-order segments. This traffic is over TCP. The SIP header is among multiple segments. I am trying to understand a protocol to be followed to reassemble packets that arrive out of order to be able to display them in my application. To clarify the data is segmented by TCP. By receiving out of order, I mean:

  1. SIP INVITE header first half received later, second-half earlier.
  2. TCP seq and ack are such that the segment received later is expected to be received first.

I would greatly appreciate any leads towards established protocols to implement this.


Solution

  • I suspect you may need to look deeper into your architecture as TCP is designed to deliver packets in order.

    One thing in particular to check is whether you are using multiple TCP connections in some way, maybe to boost bandwidth - this could allow out of order delivery if different packets could take different TCP connections, but within a TCP connection delivery should still be in order.