diff --git a/src/ipv6/ipv6.ml b/src/ipv6/ipv6.ml index c05a95a3..edce9510 100644 --- a/src/ipv6/ipv6.ml +++ b/src/ipv6/ipv6.ml @@ -24,7 +24,6 @@ open Lwt.Infix module Make (N : Mirage_net.S) (E : Ethernet.S) (R : Mirage_random.S) - (T : Mirage_time.S) (C : Mirage_clock.MCLOCK) = struct type ipaddr = Ipaddr.V6.t type callback = src:ipaddr -> dst:ipaddr -> Cstruct.t -> unit Lwt.t @@ -56,7 +55,7 @@ module Make (N : Mirage_net.S) | Some u, _ -> Lwt.wakeup_later u (); None in Lwt_list.iter_s (output_ign t) outs (* MCP: replace with propagation *) >>= fun () -> - T.sleep_ns (Duration.of_sec 1) >>= fun () -> + Mirage_time.sleep_ns (Duration.of_sec 1) >>= fun () -> loop u in loop (Some u) @@ -155,7 +154,7 @@ module Make (N : Mirage_net.S) ~ipv4:(fun _ -> Lwt.return_unit) ~ipv6:(input t ~tcp:noop ~udp:noop ~default:(fun ~proto:_ -> noop)) in - let timeout = T.sleep_ns (Duration.of_sec 3) in + let timeout = Mirage_time.sleep_ns (Duration.of_sec 3) in Lwt.pick [ (* MCP: replace this error swallowing with proper propagation *) (Lwt_list.iter_s (output_ign t) outs >>= fun () -> diff --git a/src/ipv6/ipv6.mli b/src/ipv6/ipv6.mli index 22c85d86..978822ce 100644 --- a/src/ipv6/ipv6.mli +++ b/src/ipv6/ipv6.mli @@ -17,7 +17,6 @@ module Make (N : Mirage_net.S) (E : Ethernet.S) (R : Mirage_random.S) - (T : Mirage_time.S) (Clock : Mirage_clock.MCLOCK) : sig include Tcpip.Ip.S with type ipaddr = Ipaddr.V6.t val connect : diff --git a/src/stack-direct/tcpip_stack_direct.ml b/src/stack-direct/tcpip_stack_direct.ml index 0cf64349..ce61a337 100644 --- a/src/stack-direct/tcpip_stack_direct.ml +++ b/src/stack-direct/tcpip_stack_direct.ml @@ -135,7 +135,6 @@ module IPV4V6 (Ipv4 : Tcpip.Ip.S with type ipaddr = Ipaddr.V4.t) (Ipv6 : Tcpip.I end module MakeV4V6 - (Time : Mirage_time.S) (Random : Mirage_random.S) (Netif : Mirage_net.S) (Eth : Ethernet.S) diff --git a/src/stack-direct/tcpip_stack_direct.mli b/src/stack-direct/tcpip_stack_direct.mli index d0e9f37c..1485fd53 100644 --- a/src/stack-direct/tcpip_stack_direct.mli +++ b/src/stack-direct/tcpip_stack_direct.mli @@ -21,7 +21,6 @@ module IPV4V6 (Ipv4 : Tcpip.Ip.S with type ipaddr = Ipaddr.V4.t) (Ipv6 : Tcpip.I end module MakeV4V6 - (Time : Mirage_time.S) (Random : Mirage_random.S) (Netif : Mirage_net.S) (Ethernet : Ethernet.S) diff --git a/src/tcp/ack.ml b/src/tcp/ack.ml index 0385ed2e..b23f0a9e 100644 --- a/src/tcp/ack.ml +++ b/src/tcp/ack.ml @@ -61,9 +61,9 @@ end (* Delayed ACKs *) -module Delayed (Time:Mirage_time.S) : M = struct +module Delayed : M = struct - module TT = Tcptimer.Make(Time) + module TT = Tcptimer.Make type delayed_r = { send_ack: Sequence.t Lwt_mvar.t; diff --git a/src/tcp/ack.mli b/src/tcp/ack.mli index 5204cf91..839a427a 100644 --- a/src/tcp/ack.mli +++ b/src/tcp/ack.mli @@ -26,4 +26,4 @@ end module Immediate : M -module Delayed(T:Mirage_time.S) : M +module Delayed : M diff --git a/src/tcp/flow.ml b/src/tcp/flow.ml index 10107ba6..91979eb9 100644 --- a/src/tcp/flow.ml +++ b/src/tcp/flow.ml @@ -20,16 +20,16 @@ open Lwt.Infix let src = Logs.Src.create "tcp.pcb" ~doc:"Mirage TCP PCB module" module Log = (val Logs.src_log src : Logs.LOG) -module Make(Ip: Tcpip.Ip.S)(Time:Mirage_time.S)(Clock:Mirage_clock.MCLOCK)(Random:Mirage_random.S) = +module Make(Ip: Tcpip.Ip.S)(Clock:Mirage_clock.MCLOCK)(Random:Mirage_random.S) = struct module ACK = Ack.Immediate - module RXS = Segment.Rx(Time)(ACK) - module TXS = Segment.Tx(Time)(Clock) - module UTX = User_buffer.Tx(Time)(Clock) + module RXS = Segment.Rx(ACK) + module TXS = Segment.Tx(Clock) + module UTX = User_buffer.Tx(Clock) module WIRE = Wire.Make(Ip) - module STATE = State.Make(Time) - module KEEPALIVE = Keepalive.Make(Time)(Clock) + module STATE = State.Make + module KEEPALIVE = Keepalive.Make(Clock) type error = [ Tcpip.Tcp.error | WIRE.error] @@ -678,7 +678,7 @@ struct let rxtime = match count with | 0 -> 3 | 1 -> 6 | 2 -> 12 | 3 -> 24 | _ -> 48 in - Time.sleep_ns (Duration.of_sec rxtime) >>= fun () -> + Mirage_time.sleep_ns (Duration.of_sec rxtime) >>= fun () -> match hashtbl_find t.connects id with | None -> Lwt.return_unit | Some (wakener, isn, _) -> diff --git a/src/tcp/flow.mli b/src/tcp/flow.mli index c3c1c2b2..67e61704 100644 --- a/src/tcp/flow.mli +++ b/src/tcp/flow.mli @@ -15,7 +15,6 @@ *) module Make (IP:Tcpip.Ip.S) - (TM:Mirage_time.S) (C:Mirage_clock.MCLOCK) (R:Mirage_random.S) : sig include Tcpip.Tcp.S with type ipaddr = IP.ipaddr diff --git a/src/tcp/keepalive.ml b/src/tcp/keepalive.ml index d8c808ee..b802913b 100644 --- a/src/tcp/keepalive.ml +++ b/src/tcp/keepalive.ml @@ -49,7 +49,7 @@ let next ~configuration ~ns state = end end - module Make(T:Mirage_time.S)(Clock:Mirage_clock.MCLOCK) = struct + module Make(Clock:Mirage_clock.MCLOCK) = struct type t = { configuration: Tcpip.Tcp.Keepalive.t; callback: ([ `SendProbe | `Close ] -> unit Lwt.t); @@ -64,7 +64,7 @@ let next ~configuration ~ns state = let ns = Int64.sub (Clock.elapsed_ns ()) t.start in match next ~configuration:t.configuration ~ns t.state with | `Wait ns, state -> - T.sleep_ns ns >>= fun () -> + Mirage_time.sleep_ns ns >>= fun () -> t.state <- state; restart t | `SendProbe, state -> diff --git a/src/tcp/keepalive.mli b/src/tcp/keepalive.mli index ea8b70bb..8f1bfb99 100644 --- a/src/tcp/keepalive.mli +++ b/src/tcp/keepalive.mli @@ -44,7 +44,7 @@ val next: configuration:Tcpip.Tcp.Keepalive.t -> ns:int64 -> state -> action * s that we last received a packet [ns] nanoseconds ago and the new state of the connection *) -module Make(T:Mirage_time.S)(Clock:Mirage_clock.MCLOCK): sig +module Make(Clock:Mirage_clock.MCLOCK): sig type t (** A keep-alive timer *) diff --git a/src/tcp/segment.ml b/src/tcp/segment.ml index d59f1bfb..f60927da 100644 --- a/src/tcp/segment.ml +++ b/src/tcp/segment.ml @@ -53,9 +53,9 @@ let rec reset_seq segs = It also looks for control messages and dispatches them to the Rtx queue to ack messages or close channels. *) -module Rx(Time:Mirage_time.S)(ACK: Ack.M) = struct +module Rx(ACK: Ack.M) = struct open Tcp_packet - module StateTick = State.Make(Time) + module StateTick = State.Make (* Individual received TCP segment TODO: this will change when IP fragments work *) @@ -235,10 +235,10 @@ type tx_flags = (* At most one of Syn/Fin/Rst/Psh allowed *) | Rst | Psh -module Tx (Time:Mirage_time.S) (Clock:Mirage_clock.MCLOCK) = struct +module Tx (Clock:Mirage_clock.MCLOCK) = struct - module StateTick = State.Make(Time) - module TT = Tcptimer.Make(Time) + module StateTick = State.Make + module TT = Tcptimer.Make module TX = Window.Make(Clock) type ('a, 'b) xmit = diff --git a/src/tcp/segment.mli b/src/tcp/segment.mli index 8b5133d5..9dfcf4a2 100644 --- a/src/tcp/segment.mli +++ b/src/tcp/segment.mli @@ -24,7 +24,7 @@ the Rtx queue to ack messages or close channels. *) -module Rx (T:Mirage_time.S)(ACK:Ack.M) : sig +module Rx (ACK:Ack.M) : sig type segment = { header: Tcp_packet.t; payload: Cstruct.t } (** Individual received TCP segment *) @@ -57,7 +57,7 @@ type tx_flags = No_flags | Syn | Fin | Rst | Psh (** Either Syn/Fin/Rst allowed, but not combinations *) (** Pre-transmission queue *) -module Tx (Time:Mirage_time.S)(Clock:Mirage_clock.MCLOCK) : sig +module Tx (Clock:Mirage_clock.MCLOCK) : sig type ('a, 'b) xmit = flags:tx_flags -> wnd:Window.t -> options:Options.t list -> seq:Sequence.t -> Cstruct.t -> ('a, 'b) result Lwt.t diff --git a/src/tcp/state.ml b/src/tcp/state.ml index 95eb48d7..f09097fa 100644 --- a/src/tcp/state.ml +++ b/src/tcp/state.ml @@ -92,14 +92,14 @@ let pp_tcpstate fmt = function let pp fmt t = pf fmt "{ %a }" pp_tcpstate t.state -module Make(Time:Mirage_time.S) = struct +module Make = struct let fin_wait_2_time = (* 60 *) Duration.of_sec 10 let time_wait_time = (* 30 *) Duration.of_sec 2 let rec finwait2timer t count timeout = Log.debug (fun fmt -> fmt "finwait2timer %Lu" timeout); - Time.sleep_ns timeout >>= fun () -> + Mirage_time.sleep_ns timeout >>= fun () -> match t.state with | Fin_wait_2 i -> Log.debug (fun f -> f "finwait2timer: Fin_wait_2"); @@ -116,7 +116,7 @@ module Make(Time:Mirage_time.S) = struct let timewait t twomsl = Log.debug (fun fmt -> fmt "timewait %Lu" twomsl); - Time.sleep_ns twomsl >>= fun () -> + Mirage_time.sleep_ns twomsl >>= fun () -> t.state <- Closed; Log.debug (fun fmt -> fmt "timewait on_close"); t.on_close (); diff --git a/src/tcp/state.mli b/src/tcp/state.mli index b82610be..b3d4655f 100644 --- a/src/tcp/state.mli +++ b/src/tcp/state.mli @@ -56,7 +56,7 @@ val on_close : t -> unit val pp: Format.formatter -> t -> unit -module Make(Time : Mirage_time.S) : sig +module Make : sig val fin_wait_2_time : int64 val time_wait_time : int64 val finwait2timer : t -> int -> int64 -> unit Lwt.t diff --git a/src/tcp/tcptimer.ml b/src/tcp/tcptimer.ml index 0f2a4bfe..06087180 100644 --- a/src/tcp/tcptimer.ml +++ b/src/tcp/tcptimer.ml @@ -32,7 +32,7 @@ type t = { mutable running: bool; } -module Make(Time:Mirage_time.S) = struct +module Make = struct let t ~period_ns ~expire = let running = false in {period_ns; expire; running} @@ -42,7 +42,7 @@ module Make(Time:Mirage_time.S) = struct Stats.incr_timer (); let rec aux t s = Log.debug (fun f -> f "timerloop: sleeping for %Lu ns" t.period_ns); - Time.sleep_ns t.period_ns >>= fun () -> + Mirage_time.sleep_ns t.period_ns >>= fun () -> t.expire s >>= function | Stoptimer -> Stats.decr_timer (); diff --git a/src/tcp/tcptimer.mli b/src/tcp/tcptimer.mli index 25e3d8bb..120e78cd 100644 --- a/src/tcp/tcptimer.mli +++ b/src/tcp/tcptimer.mli @@ -23,7 +23,7 @@ type tr = | Continue of Sequence.t | ContinueSetPeriod of (time * Sequence.t) -module Make(T:Mirage_time.S) : sig +module Make : sig val t : period_ns: time -> expire: (Sequence.t -> tr Lwt.t) -> t val start : t -> ?p:time -> Sequence.t -> unit Lwt.t diff --git a/src/tcp/user_buffer.ml b/src/tcp/user_buffer.ml index 7e6d5749..3f8e84fb 100644 --- a/src/tcp/user_buffer.ml +++ b/src/tcp/user_buffer.ml @@ -116,9 +116,9 @@ end to decide how to throttle or breakup its data production with this information. *) -module Tx(Time:Mirage_time.S)(Clock:Mirage_clock.MCLOCK) = struct +module Tx(Clock:Mirage_clock.MCLOCK) = struct - module TXS = Segment.Tx(Time)(Clock) + module TXS = Segment.Tx(Clock) type t = { wnd: Window.t; diff --git a/src/tcp/user_buffer.mli b/src/tcp/user_buffer.mli index c0d0ec19..42feeb92 100644 --- a/src/tcp/user_buffer.mli +++ b/src/tcp/user_buffer.mli @@ -27,12 +27,12 @@ module Rx : sig val monitor: t -> int32 Lwt_mvar.t -> unit end -module Tx(Time:Mirage_time.S)(Clock:Mirage_clock.MCLOCK) : sig +module Tx(Clock:Mirage_clock.MCLOCK) : sig type t module TXS : sig - type t = Segment.Tx(Time)(Clock).t + type t = Segment.Tx(Clock).t val output : ?flags:Segment.tx_flags -> ?options:Options.t list -> t -> Cstruct.t -> unit Lwt.t end diff --git a/tcpip.opam b/tcpip.opam index a272b7ae..9146242a 100644 --- a/tcpip.opam +++ b/tcpip.opam @@ -30,8 +30,8 @@ depends: [ "cstruct-lwt" "mirage-net" {>= "3.0.0"} "mirage-clock" {>= "3.0.0"} - "mirage-random" {>= "2.0.0"} - "mirage-time" {>= "2.0.0"} + "mirage-random" {>= "2.0.0" & < "4.0.0"} + "mirage-time" {>= "4.0.0"} "ipaddr" {>= "5.0.0"} "macaddr" {>="4.0.0"} "macaddr-cstruct" @@ -48,7 +48,7 @@ depends: [ "alcotest" {with-test & >="1.5.0"} "pcap-format" {with-test} "mirage-clock-unix" {with-test & >= "3.0.0"} - "mirage-random-test" {with-test & >= "0.1.0"} + "mirage-crypto-rng" {with-test & >= "0.11.0"} "ipaddr-cstruct" "macaddr-cstruct" "lru" {>= "0.3.0"} diff --git a/test/dune b/test/dune index 4315ca3e..56f13488 100644 --- a/test/dune +++ b/test/dune @@ -1,6 +1,6 @@ (test (name test) - (libraries alcotest mirage-random-test lwt.unix logs logs.fmt + (libraries alcotest mirage-crypto-rng mirage-crypto-rng.unix lwt.unix logs logs.fmt mirage-flow mirage-vnetif mirage-clock-unix pcap-format duration mirage-random arp arp.mirage ethernet tcpip.ipv4 tcpip.tcp tcpip.udp tcpip.stack-direct tcpip.icmpv4 tcpip.udpv4v6-socket tcpip.tcpv4v6-socket diff --git a/test/low_level.ml b/test/low_level.ml index 204bac1d..e5685ee7 100644 --- a/test/low_level.ml +++ b/test/low_level.ml @@ -11,8 +11,8 @@ module VNETIF_STACK = Vnetif_common.VNETIF_STACK(Vnetif_backends.Basic) module Time = Vnetif_common.Time module V = Vnetif.Make(Vnetif_backends.Basic) module E = Ethernet.Make(V) -module A = Arp.Make(E)(Time) -module I = Static_ipv4.Make(Mirage_random_test)(Vnetif_common.Clock)(E)(A) +module A = Arp.Make(E) +module I = Static_ipv4.Make(Mirage_crypto_rng)(Vnetif_common.Clock)(E)(A) module Wire = Tcp.Wire module WIRE = Wire.Make(I) module Tcp_wire = Tcp.Tcp_wire diff --git a/test/static_arp.ml b/test/static_arp.ml index 37599094..da3e1071 100644 --- a/test/static_arp.ml +++ b/test/static_arp.ml @@ -1,7 +1,7 @@ open Lwt.Infix -module Make(E : Ethernet.S)(Time : Mirage_time.S) = struct - module A = Arp.Make(E)(Time) +module Make(E : Ethernet.S) = struct + module A = Arp.Make(E) (* generally repurpose A, but substitute input and query, and add functions for adding/deleting entries *) type error = A.error diff --git a/test/test.ml b/test/test.ml index 92e8c0b8..3e8e7d80 100644 --- a/test/test.ml +++ b/test/test.ml @@ -39,8 +39,7 @@ let run test () = let () = Printexc.record_backtrace true; - (* someone has to call Mirage_random_test.initialize () *) - Mirage_random_test.initialize (); + Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna); (* enable logging to stdout for all modules *) Logs.set_reporter (Logs_fmt.reporter ()); Logs.set_level ~all:true (Some Logs.Debug); diff --git a/test/test_deadlock.ml b/test/test_deadlock.ml index 6f1bf86b..8194adcd 100644 --- a/test/test_deadlock.ml +++ b/test/test_deadlock.ml @@ -10,13 +10,7 @@ module Client_log = (val Logs.src_log client_log : Logs.LOG) module TCPIP = struct - module RANDOM = Mirage_random_test - - module TIME = - struct - type 'a io = 'a Lwt.t - let sleep_ns nanos = Lwt_unix.sleep (Int64.to_float nanos /. 1e9) - end + module RANDOM = Mirage_crypto_rng module MCLOCK = Mclock @@ -25,14 +19,14 @@ struct module B = Basic_backend.Make module NETIF = Vnetif.Make(B) module ETHIF = Ethernet.Make(NETIF) - module ARPV4 = Arp.Make(ETHIF)(TIME) + module ARPV4 = Arp.Make(ETHIF) module IPV4 = Static_ipv4.Make(RANDOM)(MCLOCK)(ETHIF)(ARPV4) - module IPV6 = Ipv6.Make(NETIF)(ETHIF)(RANDOM)(TIME)(MCLOCK) + module IPV6 = Ipv6.Make(NETIF)(ETHIF)(RANDOM)(MCLOCK) module IP = Tcpip_stack_direct.IPV4V6(IPV4)(IPV6) module ICMPV4 = Icmpv4.Make(IPV4) module UDP = Udp.Make(IP)(RANDOM) - module TCP = Tcp.Flow.Make(IP)(TIME)(MCLOCK)(RANDOM) - module TCPIP = Tcpip_stack_direct.MakeV4V6(TIME)(RANDOM)(NETIF)(ETHIF)(ARPV4)(IP)(ICMPV4)(UDP)(TCP) + module TCP = Tcp.Flow.Make(IP)(MCLOCK)(RANDOM) + module TCPIP = Tcpip_stack_direct.MakeV4V6(RANDOM)(NETIF)(ETHIF)(ARPV4)(IP)(ICMPV4)(UDP)(TCP) end open M @@ -80,7 +74,7 @@ let test_digest netif1 netif2 = TCPIP.make `Server netif2 >>= fun server_stack -> let send_data () = - let data = Mirage_random_test.generate 100_000_000 |> Cstruct.to_string in + let data = Mirage_crypto_rng.generate 100_000_000 |> Cstruct.to_string in let t0 = Unix.gettimeofday () in TCPIP.TCP.create_connection TCPIP.(tcp @@ tcpip server_stack) (Ipaddr.V4 TCPIP.client_ip, port) >>= function diff --git a/test/test_icmpv4.ml b/test/test_icmpv4.ml index 7455f980..6717a047 100644 --- a/test/test_icmpv4.ml +++ b/test/test_icmpv4.ml @@ -7,7 +7,7 @@ module Time = Vnetif_common.Time module B = Basic_backend.Make module V = Vnetif.Make(B) module E = Ethernet.Make(V) -module Static_arp = Static_arp.Make(E)(Time) +module Static_arp = Static_arp.Make(E) open Lwt.Infix @@ -18,10 +18,10 @@ type decomposed = { ethernet_header : Ethernet.Packet.t; } -module Ip = Static_ipv4.Make(Mirage_random_test)(Mclock)(E)(Static_arp) +module Ip = Static_ipv4.Make(Mirage_crypto_rng)(Mclock)(E)(Static_arp) module Icmp = Icmpv4.Make(Ip) -module Udp = Udp.Make(Ip)(Mirage_random_test) +module Udp = Udp.Make(Ip)(Mirage_crypto_rng) type stack = { backend : B.t; diff --git a/test/test_ipv6.ml b/test/test_ipv6.ml index 7e5ea5bf..a862a41a 100644 --- a/test/test_ipv6.ml +++ b/test/test_ipv6.ml @@ -4,8 +4,8 @@ module B = Vnetif_backends.Basic module V = Vnetif.Make(B) module E = Ethernet.Make(V) -module Ipv6 = Ipv6.Make(V)(E)(Mirage_random_test)(Time)(Mclock) -module Udp = Udp.Make(Ipv6)(Mirage_random_test) +module Ipv6 = Ipv6.Make(V)(E)(Mirage_crypto_rng)(Mclock) +module Udp = Udp.Make(Ipv6)(Mirage_crypto_rng) open Lwt.Infix let ip = diff --git a/test/test_udp.ml b/test/test_udp.ml index 2f7d8bb5..2636b3d2 100644 --- a/test/test_udp.ml +++ b/test/test_udp.ml @@ -4,9 +4,9 @@ module Time = Vnetif_common.Time module B = Basic_backend.Make module V = Vnetif.Make(B) module E = Ethernet.Make(V) -module Static_arp = Static_arp.Make(E)(Time) -module Ip = Static_ipv4.Make(Mirage_random_test)(Mclock)(E)(Static_arp) -module Udp = Udp.Make(Ip)(Mirage_random_test) +module Static_arp = Static_arp.Make(E) +module Ip = Static_ipv4.Make(Mirage_crypto_rng)(Mclock)(E)(Static_arp) +module Udp = Udp.Make(Ip)(Mirage_crypto_rng) type stack = { backend : B.t; diff --git a/test/vnetif_backends.ml b/test/vnetif_backends.ml index 4c4f8cb1..db7e0574 100644 --- a/test/vnetif_backends.ml +++ b/test/vnetif_backends.ml @@ -101,10 +101,8 @@ module Uniform_packet_loss : Backend = struct let write t id ~size fill = if Random.float 1.0 < drop_p then - begin - MProf.Trace.label "pkt_drop"; - Lwt.return (Ok ()) (* drop packet *) - end else + Lwt.return (Ok ()) (* drop packet *) + else X.write t id ~size fill (* pass to real write *) let create () = @@ -125,10 +123,8 @@ module Uniform_no_payload_packet_loss : Backend = struct let write t id ~size fill = if size <= no_payload_len && Random.float 1.0 < drop_p then - begin - MProf.Trace.label "pkt_drop"; - Lwt.return (Ok ()) (* drop packet *) - end else + Lwt.return (Ok ()) (* drop packet *) + else X.write t id ~size fill (* pass to real write *) let create () = @@ -216,7 +212,6 @@ module On_off_switch = struct if not !send_packets then begin Logs.info (fun f -> f "write dropping 1 packet"); - MProf.Trace.label "pkt_drop"; Lwt.return (Ok ()) (* drop packet *) end else X.write t id ~size fill (* pass to real write *) diff --git a/test/vnetif_common.ml b/test/vnetif_common.ml index 2791e505..2b10e846 100644 --- a/test/vnetif_common.ml +++ b/test/vnetif_common.ml @@ -69,16 +69,16 @@ end module V = Vnetif.Make(B) module E = Ethernet.Make(V) - module A = Arp.Make(E)(Time) - module Ip4 = Static_ipv4.Make(Mirage_random_test)(Clock)(E)(A) + module A = Arp.Make(E) + module Ip4 = Static_ipv4.Make(Mirage_crypto_rng)(Clock)(E)(A) module Icmp4 = Icmpv4.Make(Ip4) - module Ip6 = Ipv6.Make(V)(E)(Mirage_random_test)(Time)(Clock) + module Ip6 = Ipv6.Make(V)(E)(Mirage_crypto_rng)(Clock) module Ip46 = Tcpip_stack_direct.IPV4V6(Ip4)(Ip6) - module U = Udp.Make(Ip46)(Mirage_random_test) - module T = Tcp.Flow.Make(Ip46)(Time)(Clock)(Mirage_random_test) + module U = Udp.Make(Ip46)(Mirage_crypto_rng) + module T = Tcp.Flow.Make(Ip46)(Clock)(Mirage_crypto_rng) module Stack = - Tcpip_stack_direct.MakeV4V6(Time)(Mirage_random_test)(V)(E)(A)(Ip46)(Icmp4)(U)(T) + Tcpip_stack_direct.MakeV4V6(Mirage_crypto_rng)(V)(E)(A)(Ip46)(Icmp4)(U)(T) let create_backend () = B.create ()