Skip to content

Commit

Permalink
Merge pull request #517 from hannesm/mirage-vnetif-0.6.2
Browse files Browse the repository at this point in the history
adapt to mirage-vnetif 0.6.2 changes
  • Loading branch information
hannesm authored May 24, 2024
2 parents 463b0c2 + 4bdb2b5 commit 3f43af3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion tcpip.opam
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ depends: [
"ethernet" {>= "3.0.0"}
"arp" {>= "3.0.0"}
"mirage-flow" {>= "4.0.0"}
"mirage-vnetif" {with-test & >= "0.5.0"}
"mirage-vnetif" {with-test & >= "0.6.2"}
"alcotest" {with-test & >="1.5.0"}
"pcap-format" {with-test}
"mirage-clock-unix" {with-test & >= "3.0.0"}
Expand Down
10 changes: 0 additions & 10 deletions test/vnetif_backends.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ module Frame_size_enforced = struct
mutable frame_size : int;
}

type macaddr = X.macaddr
type 'a io = 'a X.io
type buffer = X.buffer
type id = X.id

let register t =
X.register t.xt

Expand Down Expand Up @@ -142,11 +137,6 @@ module Drop_1_second_after_1_megabyte : Backend = struct
mutable done_dropping : bool;
}

type macaddr = X.macaddr
type 'a io = 'a X.io
type buffer = X.buffer
type id = X.id

let byte_limit : int = 1_000_000
let time_to_sleep : float = 1.0

Expand Down
10 changes: 2 additions & 8 deletions test/vnetif_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ module Clock = Mclock
module type VNETIF_STACK =
sig
type backend
type buffer
type 'a io
type id
module Stack : Tcpip.Stack.V4V6

(** Create a new backend *)
Expand All @@ -43,10 +40,10 @@ sig
?gateway:Ipaddr.V4.t -> ?cidr6:Ipaddr.V6.Prefix.t ->
?gateway6:Ipaddr.V6.t -> backend -> Stack.t Lwt.t

val create_backend_listener : backend -> (buffer -> unit io) -> id
val create_backend_listener : backend -> (Cstruct.t -> unit Lwt.t) -> int

(** Disable a listener function *)
val disable_backend_listener : backend -> id -> unit io
val disable_backend_listener : backend -> int -> unit Lwt.t

(** Records pcap data from the backend while running the specified
function. Disables the pcap recorder when the function exits. *)
Expand All @@ -62,9 +59,6 @@ module VNETIF_STACK (B: Vnetif_backends.Backend): sig
end
= struct
type backend = B.t
type buffer = B.buffer
type 'a io = 'a B.io
type id = B.id

module V = Vnetif.Make(B)
module E = Ethernet.Make(V)
Expand Down

0 comments on commit 3f43af3

Please sign in to comment.