package seqnum
import "gvisor.dev/gvisor/pkg/tcpip/seqnum"
Package seqnum defines the types and methods for TCP sequence numbers such that they fit in 32-bit words and work properly when overflows occur.
Index ¶
Types ¶
type Size ¶
type Size uint32
Size represents the size (length) of a sequence number window.
type Value ¶
type Value uint32
Value represents the value of a sequence number.
func (Value) Add ¶
Add calculates the sequence number following the [v, v+s) window.
func (Value) InRange ¶
InRange checks if v is in the range [a,b), i.e., a <= v < b.
func (Value) InWindow ¶
InWindow checks if v is in the window that starts at 'first' and spans 'size' sequence numbers.
func (Value) LessThan ¶
LessThan checks if v is before w, i.e., v < w.
func (Value) LessThanEq ¶
LessThanEq returns true if v==w or v is before i.e., v < w.
func (Value) Size ¶
Size calculates the size of the window defined by [v, w).
func (*Value) UpdateForward ¶
UpdateForward updates v such that it becomes v + s.
Source Files ¶
seqnum.go
- Version
- v0.0.0-20250515200445-d30c58e5b8a4 (latest)
- Published
- May 15, 2025
- Platform
- linux/amd64
- Last checked
- 9 hours ago –
Tools for package owners.