tcpip

OCaml TCP/IP networking stack, used in MirageOS
Library tcp
Module Tcp . Segment . Rx

Parameters

module T : Mirage_time.S

Signature

type segment = {
header : Tcp_packet.t;
payload : Cstruct.t;
}

Individual received TCP segment

val pp_segment : Format.formatter -> segment -> unit
type t

Queue of receive segments

val pp : Format.formatter -> t -> unit
val create : rx_data:(Cstruct.t list option * Sequence.t option) Lwt_mvar.t -> wnd:Window.t -> state:State.t -> tx_ack:(Sequence.t * int) Lwt_mvar.t -> t
val is_empty : t -> bool
val input : t -> segment -> unit Lwt.t

Given the current receive queue and an incoming packet, update the window, extract any ready segments into the user receive queue, and signal any acks to the Tx queue