package utcp

  1. Overview
  2. Docs

Module Utcp.SequenceSource

The module of TCP sequence numbers (unsigned 32 bit values, arithmetic operations may wrap), comparison adheres to serial number arithmetics from RFC 1982.

Sourcetype t

The abstract type of a sequence number.

Sourceval of_int32 : int32 -> t

of_int32 i converts i to a sequence number.

Sourceval to_int32 : t -> int32

to_int32 t converts t to an int32.

Sourceval zero : t

zero is the 0 as sequence number.

Sourceval add : t -> t -> t

add s1 s2 adds sequence number s1 to s2.

Sourceval incr : t -> t

incr s increments the sequence number s by 1.

Sourceval addi : t -> int -> t

addi s i adds i to the sequence number s.

Sourceval window : t -> t -> int

window s1 s2 computes the window (amount of bytes) between s1 and s2.

Sourceval less : t -> t -> bool

less s1 s2 checks whether s1 is smaller than s2.

Sourceval less_equal : t -> t -> bool

less_equal s1 s2 checks whether s1 is smaller than s2 or equal to s2.

Sourceval greater : t -> t -> bool

greater s1 s2 checks whether s1 is greater than s2.

Sourceval greater_equal : t -> t -> bool

greater_equal s1 s2 checks whether s1 is greater than s2 or equal to s2.

Sourceval equal : t -> t -> bool

equal s1 s2 checks whether s1 is equal to s2.

Sourceval min : t -> t -> t

min s1 s2 returns the minimum of s1 and s2.

Sourceval max : t -> t -> t

max s1 s2 returns the maximum of s1 and s2.

Sourceval pp : t Fmt.t

pp s pretty-prints the sequence number s.