File tree 7 files changed +15
-17
lines changed
7 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 3
3
(public_name server)
4
4
(modules server)
5
5
(libraries utcp mirage-net-unix cstruct lwt logs ethernet arp.mirage
6
- tcpip.ipv4 mirage-crypto-rng-mirage mirage- unix mirage-clock -unix lwt.unix
6
+ tcpip.ipv4 mirage-crypto-rng. unix mirage-unix lwt.unix
7
7
cmdliner logs.fmt fmt.cli logs.cli fmt.tty mtime.clock.os)
8
8
(optional))
9
9
12
12
(public_name single)
13
13
(modules single)
14
14
(libraries utcp mirage-net-unix cstruct lwt logs ethernet arp.mirage
15
- mirage-crypto-rng-mirage tcpip.ipv4 mirage-crypto-rng mirage-unix
16
- mirage-clock-unix lwt.unix cmdliner logs.fmt fmt.cli logs.cli fmt.tty
15
+ mirage-crypto-rng.unix tcpip.ipv4 mirage-crypto-rng mirage-unix
16
+ lwt.unix cmdliner logs.fmt fmt.cli logs.cli fmt.tty
17
17
mtime.clock.os)
18
18
(optional))
19
19
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ let cb ~proto ~src ~dst payload =
27
27
let jump () =
28
28
Printexc. record_backtrace true ;
29
29
Lwt_main. run (
30
- Mirage_crypto_rng_mirage. initialize ( module Mirage_crypto_rng. Fortuna ) >> = fun () ->
30
+ Mirage_crypto_rng_unix. use_default () ;
31
31
Netif. connect " tap2" >> = fun tap ->
32
32
Ethernet. connect tap >> = fun eth ->
33
33
ARP. connect eth >> = fun arp ->
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ let tcp_cb ~src ~dst payload =
31
31
let jump _ src src_port dst dst_port syn fin rst push ack seq window data =
32
32
Printexc. record_backtrace true ;
33
33
Lwt_main. run (
34
- Mirage_crypto_rng_mirage. initialize ( module Mirage_crypto_rng. Fortuna ) >> = fun () ->
34
+ Mirage_crypto_rng_unix. use_default () ;
35
35
let cidr = Ipaddr.V4.Prefix. of_string_exn src
36
36
and dst = Ipaddr. (V4 (V4. of_string_exn dst))
37
37
in
Original file line number Diff line number Diff line change 1
1
(library
2
2
(name utcp_mirage)
3
3
(public_name utcp.mirage)
4
- (libraries utcp lwt tcpip mirage-crypto-rng-mirage mirage-time mirage-clock ))
4
+ (libraries utcp lwt tcpip mirage-mtime mirage- crypto-rng mirage-sleep ))
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ open Lwt.Infix
3
3
let src = Logs.Src. create " tcp.mirage" ~doc: " TCP mirage"
4
4
module Log = (val Logs. src_log src : Logs.LOG )
5
5
6
- module Make (Mclock : Mirage_clock.MCLOCK ) ( Time : Mirage_time.S ) ( Ip : Tcpip.Ip.S with type ipaddr = Ipaddr.t ) = struct
6
+ module Make (Ip : Tcpip.Ip.S with type ipaddr = Ipaddr.t ) = struct
7
7
8
- let now () = Mtime. of_uint64_ns (Mclock . elapsed_ns () )
8
+ let now () = Mtime. of_uint64_ns (Mirage_mtime . elapsed_ns () )
9
9
10
10
type error = Tcpip.Tcp .error
11
11
@@ -209,7 +209,7 @@ module Make (Mclock : Mirage_clock.MCLOCK) (Time : Mirage_time.S) (Ip : Tcpip.Ip
209
209
drops;
210
210
(* TODO do not ignore IP write error *)
211
211
Lwt_list. iter_p (fun data -> output_ip t data > |= ignore) outs >> = fun () ->
212
- Time. sleep_ns (Duration. of_ms 100 ) >> = fun () ->
212
+ Mirage_sleep. ns (Duration. of_ms 100 ) >> = fun () ->
213
213
(timer [@ tailcall]) (succ n)
214
214
in
215
215
timer 0 );
Original file line number Diff line number Diff line change 1
1
2
- module Make (Mclock : Mirage_clock.MCLOCK ) ( Time : Mirage_time.S ) ( Ip : Tcpip.Ip.S with type ipaddr = Ipaddr.t ) : sig
2
+ module Make (Ip : Tcpip.Ip.S with type ipaddr = Ipaddr.t ) : sig
3
3
include Tcpip.Tcp. S with type ipaddr = Ip. ipaddr
4
4
5
5
val connect : string -> Ip .t -> t
Original file line number Diff line number Diff line change @@ -22,19 +22,17 @@ depends: [
22
22
#for mirage sublibrary
23
23
"lwt" {>= "5.4.2"}
24
24
"mirage-crypto-rng-mirage" {>= "1.0.0"}
25
- "mirage-time " {>= "2 .0.1 "}
26
- "mirage-clock " {>= "3.1 .0"}
27
- "tcpip" {>= "8 .0.1 "}
25
+ "mirage-sleep " {>= "4 .0.0 "}
26
+ "mirage-mtime " {>= "5.0 .0"}
27
+ "tcpip" {>= "9 .0.0 "}
28
28
"mirage-flow" {>= "4.0.0"}
29
29
#for apps
30
- "mirage-crypto-rng" {>= "1.0.0" & dev}
31
- "mirage-crypto-rng-mirage"
30
+ "mirage-crypto-rng" {>= "1.2.0" & dev}
32
31
"cmdliner" {>= "1.1.0" & dev}
33
32
"mirage-net-unix" {>= "2.8.0" & dev}
34
33
"ethernet" {>= "2.2.1" & dev}
35
- "arp" {>= "2.3 .0" & dev}
34
+ "arp" {>= "4.0 .0" & dev}
36
35
"mirage-unix" {>= "5.0.0" & dev}
37
- "mirage-clock-unix" {>= "3.1.0" & dev}
38
36
"pcap-format" {>= "0.6.0" & dev}
39
37
"alcotest" {>= "1.5.0" & with-test}
40
38
"crowbar" {>= "0.2.1" & with-test}
You can’t perform that action at this time.
0 commit comments