ADDED:
* iox package
* mapsx package
* netx/inetcksum package
This commit is contained in:
brent saner
2025-12-18 04:47:31 -05:00
parent 6ddfcdb416
commit 145c32268e
19 changed files with 824 additions and 148 deletions

View File

@@ -10,11 +10,20 @@ const (
)
const (
// cksumMask is AND'd with a checksum to get the "carried ones".
/*
cksumMask is AND'd with a checksum to get the "carried ones"
(the lower 16 bits before folding carries).
*/
cksumMask uint32 = 0x0000ffff
// cksumShift is used in the "carried-ones folding".
/*
cksumShift is used in the "carried-ones folding";
it's the number of bits to right-shift the carry-over.
*/
cksumShift uint32 = 0x00000010
// padShift is used to "pad out" a checksum for odd-length buffers by left-shifting.
/*
padShift is used to "pad out" a checksum for odd-length buffers by left-shifting.
It positions the high-byte of a 16-byte "word" (big-endian, as per ord below).
*/
padShift uint32 = 0x00000008
)