Skip to content

A library for calculating packet checksums, can also be applied when csum offloading is available

License

Notifications You must be signed in to change notification settings

vproxy-tools/checksum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

checksum

A library for calculating packet checksums, can also be applied when csum offloading is available

How to use

// calculate all checksums:
vproxy_pkt_ether_csum(pkt, pktlen, VPROXY_CSUM_ALL);

// calculate ip checksum and pseudo header checksum for upper layer protocols:
vproxy_pkt_ether_csum(pkt, pktlen, VPROXY_CSUM_UP_PSEUDO);

// calculate tcp checksum when iphdr and tcphdr location already known
struct vproxy_csum_out out;
vproxy_pkt_tcp4_csum(ipp, tcpp, tcplen, VPROXY_CSUM_ALL, &out);

About

A library for calculating packet checksums, can also be applied when csum offloading is available

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published