Skip to content

Commit

Permalink
Merge pull request #6 from hannesm/easy
Browse files Browse the repository at this point in the history
adapt to mirage-net 3.0.0 and mirage-protocols 4.0.0 signature changes
  • Loading branch information
hannesm authored Oct 30, 2019
2 parents ff45cfc + 2e6936c commit c066a90
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
language: c
install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh
script: bash -ex .travis-opam.sh
sudo: required
install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-docker.sh
script: bash -ex .travis-docker.sh
sudo: false
services:
- docker
env:
global:
- TESTS=true
- PACKAGE="ethernet"
- EXTRA_REMOTES="https://github.com/mirage/mirage-dev.git"
- DISTRO=alpine
matrix:
- OCAML_VERSION=4.04
- OCAML_VERSION=4.05
- OCAML_VERSION=4.06
- OCAML_VERSION=4.07
- OCAML_VERSION=4.08
- OCAML_VERSION=4.09
notifications:
email: false
6 changes: 3 additions & 3 deletions ethernet.opam
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ build: [

depends: [
"dune"
"ocaml" {>= "4.04.0"}
"ocaml" {>= "4.06.0"}
"rresult" {>= "0.5.0"}
"cstruct" {>= "3.0.2"}
"ppx_cstruct"
"mirage-net-lwt" {>= "2.0.0"}
"mirage-protocols-lwt" {>= "2.0.0"}
"mirage-net" {>= "3.0.0"}
"mirage-protocols" {>= "4.0.0"}
"macaddr" {>= "4.0.0"}
"mirage-profile" {>= "0.5"}
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion src/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(name ethernet)
(public_name ethernet)
(libraries cstruct macaddr mirage-net-lwt mirage-protocols-lwt rresult logs mirage-profile)
(libraries cstruct macaddr mirage-net mirage-protocols rresult logs mirage-profile)
(preprocess (pps ppx_cstruct))
(wrapped false))
7 changes: 1 addition & 6 deletions src/ethernet.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ open Lwt.Infix
let src = Logs.Src.create "ethernet" ~doc:"Mirage Ethernet"
module Log = (val Logs.src_log src : Logs.LOG)

module Make(Netif : Mirage_net_lwt.S) = struct

type 'a io = 'a Lwt.t
type buffer = Cstruct.t
type macaddr = Macaddr.t

module Make(Netif : Mirage_net.S) = struct
type error = [ Mirage_protocols.Ethernet.error | `Netif of Netif.error ]
let pp_error ppf = function
| #Mirage_protocols.Ethernet.error as e -> Mirage_protocols.Ethernet.pp_error ppf e
Expand Down
4 changes: 2 additions & 2 deletions src/ethernet.mli
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

(** OCaml Ethernet (IEEE 802.3) layer *)

module Make (N : Mirage_net_lwt.S) : sig
include Mirage_protocols_lwt.ETHERNET
module Make (N : Mirage_net.S) : sig
include Mirage_protocols.ETHERNET

val connect : N.t -> t Lwt.t
(** [connect netif] connects an ethernet layer on top of the raw
Expand Down

0 comments on commit c066a90

Please sign in to comment.