package tcpip

  1. Overview
  2. Docs

Parameters

module Time : Mirage_time.S
module Random : Mirage_random.C
module Netif : Mirage_net_lwt.S
module Ethif : Mirage_protocols_lwt.ETHIF with type netif = Netif.t
module Arpv4 : Mirage_protocols_lwt.ARP
module Ipv4 : Mirage_protocols_lwt.IPV4 with type ethif = Ethif.t
module Icmpv4 : Mirage_protocols_lwt.ICMPV4
module Udpv4 : UDPV4_DIRECT with type ip = Ipv4.t
module Tcpv4 : TCPV4_DIRECT with type ip = Ipv4.t

Signature

include Mirage_stack_lwt.V4 with type netif = Netif.t and 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
type netif = Netif.t
type !'a config = 'a Mirage_stack_lwt.stackv4_config
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 : sig ... end
module TCPV4 : sig ... end
module IPV4 : sig ... end
val udpv4 : t -> udpv4
val tcpv4 : t -> tcpv4
val ipv4 : t -> ipv4
val listen_udpv4 : t -> port:int -> UDPV4.callback -> unit
val listen_tcpv4 : t -> port:int -> TCPV4.callback -> unit
val listen : t -> unit io
val connect : netif Mirage_stack_lwt.stackv4_config -> 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.