package tcpip

  1. Overview
  2. Docs

Parameters

module Time : Mirage_time.S
module Random : Mirage_random.C
module Netif : Mirage_net_lwt.S
module Udpv4 : UDPV4_DIRECT
module Tcpv4 : TCPV4_DIRECT

Signature

include Mirage_stack_lwt.V4 with type udpv4 = Udpv4.t and type tcpv4 = Tcpv4.t and type ipv4 = Ipv4.t and module IPV4 = Ipv4 and module TCPV4 = Tcpv4 and module UDPV4 = Udpv4
include Mirage_stack.V4 with type 'a io = 'a Lwt.t and type ipv4addr = Ipaddr.V4.t and type buffer = Cstruct.t with type udpv4 = Udpv4.t with type tcpv4 = Tcpv4.t with type ipv4 = Ipv4.t with module IPV4 = Ipv4 with module TCPV4 = Tcpv4 with module UDPV4 = Udpv4
type ipv4addr = Ipaddr.V4.t
type buffer = Cstruct.t
type udpv4 = Udpv4.t
type tcpv4 = Tcpv4.t
type ipv4 = Ipv4.t
type 'a io = 'a Lwt.t
type t
val disconnect : t -> unit io
module UDPV4 = Udpv4
module TCPV4 = Tcpv4
module IPV4 = Ipv4
val udpv4 : t -> udpv4
val tcpv4 : t -> tcpv4
val ipv4 : t -> ipv4
val listen_udpv4 : t -> port:int -> UDPV4.callback -> unit
val listen_tcpv4 : ?keepalive:Mirage_protocols.Keepalive.t -> t -> port:int -> (TCPV4.flow -> unit io) -> unit
val listen : t -> unit io
val connect : Netif.t -> Ethif.t -> Arpv4.t -> Ipv4.t -> Icmpv4.t -> Udpv4.t -> Tcpv4.t -> t Lwt.t

connect assembles the arguments into a network stack, then calls `listen` on the assembled stack before returning it to the caller. The initial `listen` functions to ensure that the lower-level layers (e.g. ARP) are functioning, so that if the user wishes to establish outbound connections, they will be able to do so.

OCaml

Innovation. Community. Security.