Expand description
Byte-order helpers, checksum computation, error types.
Enums§
- Build
Error - Error returned by packet builders when construction fails.
Functions§
- internet_
checksum - Compute the 16-bit ones’ complement of the ones’ complement sum of
data. - pseudo_
header_ checksum - Compute the TCP/UDP pseudo-header checksum.
- read_
u16be - Read a big-endian u16 from a 2-byte slice. Caller guarantees
buf.len() >= 2. - read_
u32be - Read a big-endian u32 from a 4-byte slice. Caller guarantees
buf.len() >= 4. - write_
u16be - Write a big-endian u16 into a 2-byte slice. Caller guarantees
buf.len() >= 2. - write_
u32be - Write a big-endian u32 into a 4-byte slice. Caller guarantees
buf.len() >= 4.