Expand description
UDP checksum calculation and verification.
UDP uses the same pseudo-header as TCP for checksum calculation. For IPv4, the checksum is optional (can be 0), but for IPv6 it’s mandatory. Per RFC 768, if the computed checksum is 0, it should be set to 0xFFFF.
Functions§
- udp_
checksum_ ipv4 - Calculate UDP checksum with IPv4 pseudo-header.
- udp_
checksum_ ipv6 - Calculate UDP checksum with IPv6 pseudo-header.
- verify_
udp_ checksum_ ipv4 - Verify UDP checksum with IPv4 pseudo-header.
- verify_
udp_ checksum_ ipv6 - Verify UDP checksum with IPv6 pseudo-header.