Make gtcpip public for external use
This commit is contained in:
parent
f8e7794cc2
commit
a9027729be
42 changed files with 45 additions and 57 deletions
12
gtcpip/checksum/checksum_default.go
Normal file
12
gtcpip/checksum/checksum_default.go
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue