title: Comparing TCP checksums with Scapy?
body: <p>I am trying to identify packets with incorrect checksums while using Scapy as a sniffer. I am able to get the original checksum by accessing </p>
  
  <pre><code>packet[TCP].chksum  
  </code></pre>
  
  <p>I then remove this using</p>
  
  <pre><code>del packet[TCP].chksum 
  </code></pre>
  
  <p>I would like to do something like</p>
  
  <pre><code>if(originalChecksum == recomputedChecksum):
       # Checksum is valid
  </code></pre>
  
  <p>I understand that using show2() recomputes the checksum, but is there anyway to access this attribute for comparing back to the original? Calling show2() simply displays what the checksum would be, and does not set any of the values in the packet. </p>
  
  <p>Thanks for any clarification</p>