Documentation ¶
Overview ¶
Package checksum provides the implementation of the encoding and decoding of network protocol headers.
Index ¶
Constants ¶
View Source
const Size = 2
Size is the size of a checksum.
The checksum is held in a uint16 which is 2 bytes.
Variables ¶
This section is empty.
Functions ¶
func 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.
Types ¶
type Checksumer ¶
type Checksumer struct {
// contains filtered or unexported fields
}
Checksumer calculates checksum defined in RFC 1071.
func (*Checksumer) Checksum ¶
func (c *Checksumer) Checksum() uint16
Checksum returns the latest checksum value.
Click to show internal directories.
Click to hide internal directories.