Make gtcpip public for external use

This commit is contained in:
世界 2026-04-03 02:07:40 +08:00
parent f8e7794cc2
commit a9027729be
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
42 changed files with 45 additions and 57 deletions

View file

@ -0,0 +1,12 @@
//go:build !amd64
package checksum
// Checksum calculates the checksum (as defined in RFC 1071) of the bytes in the
// given byte array. This function uses an optimized version of the checksum
// algorithm.
//
// The initial checksum must have been computed on an even number of bytes.
func Checksum(buf []byte, initial uint16) uint16 {
return ChecksumDefault(buf, initial)
}