title: UDP checksum calculation
body: <p>The UDP header struct defined at /usr/include/netinet/udp.h is as follows</p>
  
  <pre><code>struct udphdr
  {
    u_int16_t source;
    u_int16_t dest;
    u_int16_t len;
    u_int16_t check;
  };
  </code></pre>
  
  <p>What value is stored in the check field of the header? How to verify if the checksum is correct? I meant on what data is the checksum computed? (Is it just the udp header or udp header plus the payload that follows it?)</p>
  
  <p>Thanks.</p>