UDP checksum calculation
- by Deepak Konidena
Hi,
The UDP header struct defined at /usr/include/netinet/udp.h is as follows
struct udphdr
{
u_int16_t source;
u_int16_t dest;
u_int16_t len;
u_int16_t check;
};
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?)
Thanks.