File tree 9 files changed +18
-19
lines changed
9 files changed +18
-19
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ depends: [
30
30
"cstruct-lwt"
31
31
"mirage-net" {>= "3.0.0"}
32
32
"mirage-clock" {>= "3.0.0"}
33
- "mirage-random" {>= "2.0.0"}
33
+ "mirage-random" {>= "2.0.0" & < "4.0.0" }
34
34
"mirage-time" {>= "2.0.0"}
35
35
"ipaddr" {>= "5.0.0"}
36
36
"macaddr" {>="4.0.0"}
@@ -48,7 +48,7 @@ depends: [
48
48
"alcotest" {with-test & >="1.5.0"}
49
49
"pcap-format" {with-test}
50
50
"mirage-clock-unix" {with-test & >= "3.0.0"}
51
- "mirage-random-test " {with-test & >= "0.1 .0"}
51
+ "mirage-crypto-rng " {with-test & >= "0.11 .0"}
52
52
"ipaddr-cstruct"
53
53
"macaddr-cstruct"
54
54
"lru" {>= "0.3.0"}
Original file line number Diff line number Diff line change 1
1
(test
2
2
(name test)
3
- (libraries alcotest mirage-random-test lwt.unix logs logs.fmt
3
+ (libraries alcotest mirage-crypto-rng mirage-crypto-rng.unix lwt.unix logs logs.fmt
4
4
mirage-flow mirage-vnetif mirage-clock-unix pcap-format duration
5
5
mirage-random arp arp.mirage ethernet tcpip.ipv4 tcpip.tcp tcpip.udp
6
6
tcpip.stack-direct tcpip.icmpv4 tcpip.udpv4v6-socket tcpip.tcpv4v6-socket
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ module Time = Vnetif_common.Time
12
12
module V = Vnetif. Make (Vnetif_backends. Basic )
13
13
module E = Ethernet. Make (V )
14
14
module A = Arp. Make (E )(Time )
15
- module I = Static_ipv4. Make (Mirage_random_test )(Vnetif_common. Clock )(E )(A )
15
+ module I = Static_ipv4. Make (Mirage_crypto_rng )(Vnetif_common. Clock )(E )(A )
16
16
module Wire = Tcp. Wire
17
17
module WIRE = Wire. Make (I )
18
18
module Tcp_wire = Tcp. Tcp_wire
Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ let run test () =
39
39
40
40
let () =
41
41
Printexc. record_backtrace true ;
42
- (* someone has to call Mirage_random_test.initialize () *)
43
- Mirage_random_test. initialize () ;
42
+ Mirage_crypto_rng_unix. initialize (module Mirage_crypto_rng. Fortuna );
44
43
(* enable logging to stdout for all modules *)
45
44
Logs. set_reporter (Logs_fmt. reporter () );
46
45
Logs. set_level ~all: true (Some Logs. Debug );
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ module Client_log = (val Logs.src_log client_log : Logs.LOG)
10
10
11
11
module TCPIP =
12
12
struct
13
- module RANDOM = Mirage_random_test
13
+ module RANDOM = Mirage_crypto_rng
14
14
15
15
module TIME =
16
16
struct
@@ -80,7 +80,7 @@ let test_digest netif1 netif2 =
80
80
TCPIP. make `Server netif2 >> = fun server_stack ->
81
81
82
82
let send_data () =
83
- let data = Mirage_random_test . generate 100_000_000 |> Cstruct. to_string in
83
+ let data = Mirage_crypto_rng . generate 100_000_000 |> Cstruct. to_string in
84
84
let t0 = Unix. gettimeofday () in
85
85
TCPIP.TCP. create_connection
86
86
TCPIP. (tcp @@ tcpip server_stack) (Ipaddr. V4 TCPIP. client_ip, port) >> = function
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ type decomposed = {
18
18
ethernet_header : Ethernet.Packet .t ;
19
19
}
20
20
21
- module Ip = Static_ipv4. Make (Mirage_random_test )(Mclock )(E )(Static_arp )
21
+ module Ip = Static_ipv4. Make (Mirage_crypto_rng )(Mclock )(E )(Static_arp )
22
22
module Icmp = Icmpv4. Make (Ip )
23
23
24
- module Udp = Udp. Make (Ip )(Mirage_random_test )
24
+ module Udp = Udp. Make (Ip )(Mirage_crypto_rng )
25
25
26
26
type stack = {
27
27
backend : B .t ;
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ module B = Vnetif_backends.Basic
4
4
module V = Vnetif. Make (B )
5
5
module E = Ethernet. Make (V )
6
6
7
- module Ipv6 = Ipv6. Make (V )(E )(Mirage_random_test )(Time )(Mclock )
8
- module Udp = Udp. Make (Ipv6 )(Mirage_random_test )
7
+ module Ipv6 = Ipv6. Make (V )(E )(Mirage_crypto_rng )(Time )(Mclock )
8
+ module Udp = Udp. Make (Ipv6 )(Mirage_crypto_rng )
9
9
open Lwt.Infix
10
10
11
11
let ip =
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ module B = Basic_backend.Make
5
5
module V = Vnetif. Make (B )
6
6
module E = Ethernet. Make (V )
7
7
module Static_arp = Static_arp. Make (E )(Time )
8
- module Ip = Static_ipv4. Make (Mirage_random_test )(Mclock )(E )(Static_arp )
9
- module Udp = Udp. Make (Ip )(Mirage_random_test )
8
+ module Ip = Static_ipv4. Make (Mirage_crypto_rng )(Mclock )(E )(Static_arp )
9
+ module Udp = Udp. Make (Ip )(Mirage_crypto_rng )
10
10
11
11
type stack = {
12
12
backend : B .t ;
Original file line number Diff line number Diff line change 70
70
module E = Ethernet .Make (V )
71
71
72
72
module A = Arp .Make (E )(Time )
73
- module Ip4 = Static_ipv4 .Make (Mirage_random_test )(Clock )(E )(A )
73
+ module Ip4 = Static_ipv4 .Make (Mirage_crypto_rng )(Clock )(E )(A )
74
74
module Icmp4 = Icmpv4 .Make (Ip4 )
75
- module Ip6 = Ipv6 .Make (V )(E )(Mirage_random_test )(Time )(Clock )
75
+ module Ip6 = Ipv6 .Make (V )(E )(Mirage_crypto_rng )(Time )(Clock )
76
76
module Ip46 = Tcpip_stack_direct .IPV4V6 (Ip4 )(Ip6 )
77
- module U = Udp .Make (Ip46 )(Mirage_random_test )
78
- module T = Tcp.Flow .Make (Ip46 )(Time )(Clock )(Mirage_random_test )
77
+ module U = Udp .Make (Ip46 )(Mirage_crypto_rng )
78
+ module T = Tcp.Flow .Make (Ip46 )(Time )(Clock )(Mirage_crypto_rng )
79
79
80
80
module Stack =
81
- Tcpip_stack_direct .MakeV4V6 (Time )(Mirage_random_test )(V )(E )(A )(Ip46 )(Icmp4 )(U )(T )
81
+ Tcpip_stack_direct .MakeV4V6 (Time )(Mirage_crypto_rng )(V )(E )(A )(Ip46 )(Icmp4 )(U )(T )
82
82
83
83
let create_backend () =
84
84
B. create ()
You can’t perform that action at this time.
0 commit comments