title: TCP packet segment python
body: <p>I'm handling TCP packets. This application acts as an sniffer and builds up SIP Packets. Some TCP SIP packets come fragmented hence I need to reassemble them.</p>
  
  <p>What I do is that Initially I process first TCP connection using:</p>
  
  <pre><code>packet = s.recvfrom(sipLocatorConfig.NETWORK_MAX_SIZE)
  </code></pre>
  
  <p>After that I obtain the data and then if fragmented I get the rest but using <code>.recv</code>:</p>
  
  <pre><code>socket.recv(sipLocatorConfig.NETWORK_TCP_MAX_SIZE)
  </code></pre>
  
  <p>When I obtained the second fragment, I get garbled data at the beginning when using <code>.recv</code>, which I assume is the ETH, IP, TCP info:</p>
  
  <pre><code>M*?
  M*?@{
  QyE
  </code></pre>
  
  <p>How can I remove this ETH, IP and TCP header info and extract just the data from Packet?
  Thanks</p>