Skip to content

Commit 519c576

Browse files
authored
Merge pull request #521 from hannesm/update
use mirage-crypto 1.0 and randomconv 0.2, drop mirage-random dependency
2 parents f03cd0d + 8b78452 commit 519c576

File tree

19 files changed

+26
-26
lines changed

19 files changed

+26
-26
lines changed

src/ipv4/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
(public_name tcpip.ipv4)
44
(instrumentation
55
(backend bisect_ppx))
6-
(libraries logs ipaddr cstruct tcpip tcpip.udp tcpip.checksum mirage-random
7-
mirage-clock randomconv lru arp.mirage ethernet)
6+
(libraries logs ipaddr cstruct tcpip tcpip.udp tcpip.checksum
7+
mirage-crypto-rng-mirage mirage-clock randomconv lru arp.mirage ethernet)
88
(wrapped false))

src/ipv4/static_ipv4.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open Lwt.Infix
1919
let src = Logs.Src.create "ipv4" ~doc:"Mirage IPv4"
2020
module Log = (val Logs.src_log src : Logs.LOG)
2121

22-
module Make (R: Mirage_random.S) (C: Mirage_clock.MCLOCK) (Ethernet: Ethernet.S) (Arpv4 : Arp.S) = struct
22+
module Make (R: Mirage_crypto_rng_mirage.S) (C: Mirage_clock.MCLOCK) (Ethernet: Ethernet.S) (Arpv4 : Arp.S) = struct
2323
module Routing = Routing.Make(Log)(Arpv4)
2424

2525
(** IO operation errors *)

src/ipv4/static_ipv4.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1515
*)
1616

17-
module Make (R: Mirage_random.S) (C: Mirage_clock.MCLOCK) (E: Ethernet.S) (A: Arp.S) : sig
17+
module Make (R: Mirage_crypto_rng_mirage.S) (C: Mirage_clock.MCLOCK) (E: Ethernet.S) (A: Arp.S) : sig
1818
include Tcpip.Ip.S with type ipaddr = Ipaddr.V4.t and type prefix = Ipaddr.V4.Prefix.t
1919

2020
val connect : ?no_init:bool -> cidr:Ipaddr.V4.Prefix.t -> ?gateway:Ipaddr.V4.t ->

src/ipv6/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
(instrumentation
55
(backend bisect_ppx))
66
(libraries logs mirage-time mirage-net macaddr-cstruct tcpip.checksum
7-
mirage-clock duration ipaddr cstruct mirage-random tcpip randomconv
8-
ethernet ipaddr-cstruct)
7+
mirage-clock duration ipaddr cstruct tcpip randomconv
8+
mirage-crypto-rng-mirage ethernet ipaddr-cstruct)
99
(wrapped false))

src/ipv6/ipv6.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ open Lwt.Infix
2323

2424
module Make (N : Mirage_net.S)
2525
(E : Ethernet.S)
26-
(R : Mirage_random.S)
26+
(R : Mirage_crypto_rng_mirage.S)
2727
(T : Mirage_time.S)
2828
(C : Mirage_clock.MCLOCK) = struct
2929
type ipaddr = Ipaddr.V6.t

src/ipv6/ipv6.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module Make (N : Mirage_net.S)
1818
(E : Ethernet.S)
19-
(R : Mirage_random.S)
19+
(R : Mirage_crypto_rng_mirage.S)
2020
(T : Mirage_time.S)
2121
(Clock : Mirage_clock.MCLOCK) : sig
2222
include Tcpip.Ip.S with type ipaddr = Ipaddr.V6.t and type prefix = Ipaddr.V6.Prefix.t

src/ipv6/ndpv6.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type event =
2727

2828
type context
2929

30-
val local : handle_ra:bool -> now:time -> random:(int -> Cstruct.t) -> Macaddr.t ->
30+
val local : handle_ra:bool -> now:time -> random:(int -> string) -> Macaddr.t ->
3131
context * (Macaddr.t * int * (Cstruct.t -> int)) list
3232
(** [local ~handle_ra ~now ~random mac] is a pair [ctx, outs] where [ctx] is a local IPv6 context
3333
associated to the hardware address [mac]. [outs] is a list of ethif packets
@@ -48,7 +48,7 @@ val select_source : context -> ipaddr -> ipaddr
4848
(** [select_source ctx ip] returns the ip that should be put in the source field
4949
of a packet destined to [ip]. *)
5050

51-
val handle : now:time -> random:(int -> Cstruct.t) -> context -> Cstruct.t ->
51+
val handle : now:time -> random:(int -> string) -> context -> Cstruct.t ->
5252
context * (Macaddr.t * int * (Cstruct.t -> int)) list * event list
5353
(** [handle ~now ~random ctx buf] handles an incoming ipv6 packet. It returns
5454
[ctx', bufs, evs] where [ctx'] is the updated context, [bufs] is a list of

src/stack-direct/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
(public_name tcpip.stack-direct)
44
(instrumentation
55
(backend bisect_ppx))
6-
(libraries logs ipaddr lwt fmt mirage-time mirage-random mirage-net ethernet
7-
arp.mirage tcpip.icmpv4 tcpip.udp tcpip.tcp))
6+
(libraries logs ipaddr lwt fmt mirage-time mirage-crypto-rng-mirage mirage-net
7+
ethernet arp.mirage tcpip.icmpv4 tcpip.udp tcpip.tcp))

src/stack-direct/tcpip_stack_direct.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ end
147147

148148
module MakeV4V6
149149
(Time : Mirage_time.S)
150-
(Random : Mirage_random.S)
150+
(Random : Mirage_crypto_rng_mirage.S)
151151
(Netif : Mirage_net.S)
152152
(Eth : Ethernet.S)
153153
(Arpv4 : Arp.S)

src/stack-direct/tcpip_stack_direct.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ end
2424

2525
module MakeV4V6
2626
(Time : Mirage_time.S)
27-
(Random : Mirage_random.S)
27+
(Random : Mirage_crypto_rng_mirage.S)
2828
(Netif : Mirage_net.S)
2929
(Ethernet : Ethernet.S)
3030
(Arpv4 : Arp.S)

0 commit comments

Comments
 (0)